private void createObjectForNonConstructor(ObjectReadContext context, MethodWriterContext mwc) {
        FieldReader[] fieldReaderArray = context.fieldReaders;
        MethodWriter mw = mwc.mw;
        ObjectReaderNoneDefaultConstructor objectReaderNoneDefaultConstructor = (ObjectReaderNoneDefaultConstructor) context.objectReaderAdapter;
        boolean constructDirect = true;
        if (classLoader.isExternalClass(context.objectClass)
                || context.objectClass.getTypeParameters().length != 0
                || (objectReaderNoneDefaultConstructor.constructor != null && !Modifier.isPublic(objectReaderNoneDefaultConstructor.constructor.getModifiers()))
                || (context.objectClass != null && !Modifier.isPublic(context.objectClass.getModifiers()))
                || objectReaderNoneDefaultConstructor.factoryFunction != null
                || objectReaderNoneDefaultConstructor.noneDefaultConstructor != null && !Modifier.isPublic(objectReaderNoneDefaultConstructor.noneDefaultConstructor.getModifiers())
        ) {
            constructDirect = false;
        }

        if (constructDirect) {
            mw.new_(context.objectType);
            mw.dup();
            StringBuilder buf = new StringBuilder().append("(");
            for (FieldReader fieldReader : fieldReaderArray) {
                mw.loadLocal(fieldReader.fieldClass, mwc.var(fieldReader));
                buf.append(ASMUtils.desc(fieldReader.fieldClass));
            }
            buf.append(")V");
            mw.invokespecial(context.objectType, "<init>", buf.toString());
        } else {
            mw.aload(THIS);
            mw.iconst_n(fieldReaderArray.length);
            mw.anewArray("java/lang/Object");
            for (int i = 0; i < fieldReaderArray.length; i++) {
                FieldReader fieldReader = fieldReaderArray[i];
                mw.dup();
                mw.iconst_n(i);
                mw.loadLocal(fieldReader.fieldClass, mwc.var(fieldReader));
                if (fieldReader.fieldClass == int.class) {
                    mw.invokestatic("java/lang/Integer", "valueOf", "(I)Ljava/lang/Integer;");
                } else if (fieldReader.fieldClass == long.class) {
                    mw.invokestatic("java/lang/Long", "valueOf", "(J)Ljava/lang/Long;");
                } else if (fieldReader.fieldClass == float.class) {
                    mw.invokestatic("java/lang/Float", "valueOf", "(F)Ljava/lang/Float;");
                } else if (fieldReader.fieldClass == double.class) {
                    mw.invokestatic("java/lang/Double", "valueOf", "(D)Ljava/lang/Double;");
                } else if (fieldReader.fieldClass == boolean.class) {
                    mw.invokestatic("java/lang/Boolean", "valueOf", "(Z)Ljava/lang/Boolean;");
                } else if (fieldReader.fieldClass == short.class) {
                    mw.invokestatic("java/lang/Short", "valueOf", "(S)Ljava/lang/Short;");
                } else if (fieldReader.fieldClass == byte.class) {
                    mw.invokestatic("java/lang/Byte", "valueOf", "(B)Ljava/lang/Byte;");
                } else if (fieldReader.fieldClass == char.class) {
                    mw.invokestatic("java/lang/Character", "valueOf", "(C)Ljava/lang/Character;");
                }
                mw.aastore();
            }
            mw.invokevirtual(TYPE_OBJECT_READER_NONE_DEFAULT_CONSTRUCTOR, "createInstance", "([Ljava/lang/Object;)Ljava/lang/Object;");
        }
    }
<blockquote><pre>
     class Bean {
         private String field1;
         private int field2;
     }

     public void readJSONBObject(JSONReader jsonReader, Type fieldType, Object fieldName, long features) {
         features = jsonReader.features(features);
         if (nextIfNull()) {
             return null;
         }

         jsonReader.errorOnNoneSerializable(this.objectClass);

         if (jsonReader.isArray() && jsonReader.isSupportBeanArray()) {
             return readArrayMappingObject(jsonReader, fieldType, fieldName, features);
         }

         Bean object = new Bean();

         jsonReader.nextIfObjectStart();

         for (;;) {
             if (jsonReader.nextIfObjectEnd()) {
                 break;
             }
             switch(jsonReader.getRawInt()) {
                 case field1NameHash32:
                     if(jsonReader.nextIfName4Match2()) {
                         object.field1 = jsonReader.readString();
                         break;
                     }
                     goto hashCode64Start;
                 case field2NameHash32:
                     if(jsonReader.nextIfName4Match2()) {
                         object.field2 = jsonReader.readInt();
                         break;
                     }
                     goto hashCode64Start;
                 default:
                     goto hashCode64Start;
             }

             hashCode64Start:
             long hashCode64 = readFieldNameHashCode();

             if (this.typeKeyHashCode == hashCode64) {
                 object = this.autoType(jsonReader);
             }

             switch(jsonReader.getFieldOrdinal(hashCode64)) {
                 case 0:
                     object.field1 = jsonReader.readString();
             }
         }


     }
 </pre></blockquote>
core/src/main/java/com/alibaba/fastjson2/reader/ObjectReaderCreatorASM.java