public void generatePojos ( BuilderContext builderContext , Set < TypeDef > buildables ) { Set < TypeDef > additonalBuildables = new HashSet <> ( ) ; Set < TypeDef > additionalTypes = new HashSet <> ( ) ; for ( TypeDef typeDef : buildables ) { try { if ( typeDef . isInterface ( ) || typeDef . isAnnotation ( ) ) { typeDef = ClazzAs . POJO . apply ( typeDef ) ; builderContext . getDefinitionRepository ( ) . register ( typeDef ) ; builderContext . getBuildableRepository ( ) . register ( typeDef ) ; generateFromResources ( typeDef , Constants . DEFAULT_SOURCEFILE_TEMPLATE_LOCATION ) ; additonalBuildables . add ( typeDef ) ; if ( typeDef . hasAttribute ( ADDITIONAL_BUILDABLES ) ) { for ( TypeDef also : typeDef . getAttribute ( ADDITIONAL_BUILDABLES ) ) { builderContext . getDefinitionRepository ( ) . register ( also ) ; builderContext . getBuildableRepository ( ) . register ( also ) ; generateFromResources ( also , Constants . DEFAULT_SOURCEFILE_TEMPLATE_LOCATION ) ; additonalBuildables . add ( also ) ; } } if ( typeDef . hasAttribute ( ADDITIONAL_TYPES ) ) { for ( TypeDef also : typeDef . getAttribute ( ADDITIONAL_TYPES ) ) { builderContext . getDefinitionRepository ( ) . register ( also ) ; generateFromResources ( also , Constants . DEFAULT_SOURCEFILE_TEMPLATE_LOCATION ) ; additionalTypes . add ( also ) ; } } } } catch ( IOException e ) { throw new RuntimeException ( e ) ; } } generateBuildables ( builderContext , additonalBuildables ) ; }
Returns true if pojos where generated .