private static Set < ClassTemplateSpec > findTopLevelTypes ( ClassTemplateSpec spec ) { Set < ClassTemplateSpec > specs = new HashSet < ClassTemplateSpec > ( ClassTemplateSpecs . allReferencedTypes ( spec ) ) ; specs . add ( spec ) ; Iterator < ClassTemplateSpec > iterator = specs . iterator ( ) ; while ( iterator . hasNext ( ) ) { ClassTemplateSpec entry = iterator . next ( ) ; if ( entry . getEnclosingClass ( ) != null ) { iterator . remove ( ) ; } } return specs ; }
Currently one ClassDefinition is provided per . pdsc file . But some of those . pdsc contain inline schema definitions that should be generated into top level classes .