public static void ensureMarshallerFieldCreated(final ClassStructureBuilder<?> classStructureBuilder, final MetaClass marshallerForType, final MetaClass type, final BlockBuilder<?> initMethod) { ensureMarshallerFieldCreated(classStructureBuilder, marshallerForType, type, initMethod, null); }
public static void ensureMarshallerFieldCreated(final ClassStructureBuilder<?> classStructureBuilder, final MetaClass marshallerForType, final MetaClass type, final BlockBuilder<?> initMethod) { ensureMarshallerFieldCreated(classStructureBuilder, marshallerForType, type, initMethod, null); }
if (DefinitionsFactorySingleton.get().shouldUseObjectMarshaller(toMap)) { marshallerVarName = getVarName(MetaClassFactory.get(Object.class)); MarshallingGenUtil.ensureMarshallerFieldCreated(classBuilder, toMap, MetaClassFactory.get(Object.class), initMethod); MarshallingGenUtil.ensureMarshallerFieldCreated(classBuilder, null, toMap, initMethod); .parameters(arrayType, MarshallingSession.class).body(); MarshallingGenUtil.ensureMarshallerFieldCreated(classBuilder, null, MetaClassFactory.get(Object.class), initMethod);
if (DefinitionsFactorySingleton.get().shouldUseObjectMarshaller(toMap)) { marshallerVarName = getVarName(MetaClassFactory.get(Object.class)); MarshallingGenUtil.ensureMarshallerFieldCreated(classBuilder, toMap, MetaClassFactory.get(Object.class), initMethod); MarshallingGenUtil.ensureMarshallerFieldCreated(classBuilder, null, toMap, initMethod); .parameters(arrayType, MarshallingSession.class).body(); MarshallingGenUtil.ensureMarshallerFieldCreated(classBuilder, null, MetaClassFactory.get(Object.class), initMethod);
MarshallingGenUtil.ensureMarshallerFieldCreated(classStructureBuilder, toMap, type, lazyInitMethod, deferred); constructorParameters[parmIndex] = MarshallingGenUtil.ensureMarshallerFieldCreated(classStructureBuilder, toMap, type, lazyInitMethod); constructorParameters[parmIndex] = context.getArrayMarshallerCallback() .demarshall(type, extractJSONObjectProperty(mapping.getKey(), EJObject.class)); MarshallingGenUtil.ensureMarshallerFieldCreated(classStructureBuilder, toMap, type, lazyInitMethod); if (context.canMarshal(type.getFullyQualifiedName())) { Statement s = maybeAddAssumedTypes(builder, MarshallingGenUtil.ensureMarshallerFieldCreated(classStructureBuilder, toMap, memberMapping.getType() .asBoxed(), lazyInitMethod, deferred); MarshallingGenUtil.ensureMarshallerFieldCreated(classStructureBuilder, toMap, memberMapping.getType() .asBoxed(), lazyInitMethod); MarshallingGenUtil.ensureMarshallerFieldCreated(classStructureBuilder, toMap, memberMapping.getType() .asBoxed(), lazyInitMethod); val = fieldDemarshall(memberMapping, MetaClassFactory.get(EJObject.class), loadVariable("objVal"));
MarshallingGenUtil.ensureMarshallerFieldCreated(classStructureBuilder, toMap, type, lazyInitMethod, deferred); constructorParameters[parmIndex] = MarshallingGenUtil.ensureMarshallerFieldCreated(classStructureBuilder, toMap, type, lazyInitMethod); constructorParameters[parmIndex] = context.getArrayMarshallerCallback() .demarshall(type, extractJSONObjectProperty(mapping.getKey(), EJObject.class)); MarshallingGenUtil.ensureMarshallerFieldCreated(classStructureBuilder, toMap, type, lazyInitMethod); if (context.canMarshal(type.getFullyQualifiedName())) { Statement s = maybeAddAssumedTypes(builder, MarshallingGenUtil.ensureMarshallerFieldCreated(classStructureBuilder, toMap, memberMapping.getType() .asBoxed(), lazyInitMethod, deferred); MarshallingGenUtil.ensureMarshallerFieldCreated(classStructureBuilder, toMap, memberMapping.getType() .asBoxed(), lazyInitMethod); MarshallingGenUtil.ensureMarshallerFieldCreated(classStructureBuilder, toMap, memberMapping.getType() .asBoxed(), lazyInitMethod); val = fieldDemarshall(memberMapping, MetaClassFactory.get(EJObject.class), loadVariable("objVal"));
MarshallingGenUtil.ensureMarshallerFieldCreated(classStructureBuilder, toMap, mapping.getType() .asBoxed(), lazyInitMethod);
MarshallingGenUtil.ensureMarshallerFieldCreated(classStructureBuilder, toMap, mapping.getType() .asBoxed(), lazyInitMethod);