private Object generateObject ( final Field field , final GenContainer container , final Map < Field , Long > enumerateMap , final Set < Field > nullableFields , final int currentEmbeddedDepth ) { final IGenerator generator = genStorage . getGenInstance ( container . getGeneratorClass ( ) ) ; final Annotation annotation = container . getMarker ( ) ; Object generated ; if ( EmbeddedGenerator . class . equals ( container . getGeneratorClass ( ) ) ) { generated = generateEmbeddedObject ( annotation , field , nullableFields , currentEmbeddedDepth ) ; } else if ( enumerateMap . containsKey ( field ) ) { generated = generateEnumerateObject ( field , enumerateMap ) ; } else if ( container . isComplex ( ) ) { // If complexGen can generate embedded objects // And not handling it like BasicComplexGenerator, you are StackOverFlowed generated = ( ( IComplexGenerator ) generator ) . generate ( annotation , field , genStorage , currentEmbeddedDepth ) ; } else { generated = generator . generate ( ) ; } final Object casted = castObject ( generated , field . getType ( ) ) ; if ( casted == null ) nullableFields . add ( field ) ; return casted ; }
Generate populate field value