public static GenClassCompiler compile ( TypeElement superClass , ProcessingEnvironment env ) throws IOException { GenClassCompiler compiler ; GrammarDef grammarDef = superClass . getAnnotation ( GrammarDef . class ) ; if ( grammarDef != null ) { compiler = new ParserCompiler ( superClass ) ; } else { DFAMap mapDef = superClass . getAnnotation ( DFAMap . class ) ; if ( mapDef != null ) { compiler = new MapCompiler ( superClass ) ; } else { compiler = new GenClassCompiler ( superClass ) ; } } compiler . setProcessingEnvironment ( env ) ; compiler . compile ( ) ; if ( env == null ) { System . err . println ( "warning! classes directory not set" ) ; } else { compiler . saveClass ( ) ; } return compiler ; }
Compiles a subclass for annotated superClass