public final void execute ( @ NotNull final Set < File > files ) throws ParseException , GenerateException { Contract . requireArgNotNull ( "files" , files ) ; LOG . info ( "Executing incremental build ({} files)" , files . size ( ) ) ; if ( LOG . isDebugEnabled ( ) ) { for ( final File file : files ) { LOG . debug ( file . toString ( ) ) ; } } if ( files . size ( ) == 0 ) { // Nothing to do... return ; } // Parse models & generate final Parsers parsers = config . getParsers ( ) ; if ( parsers == null ) { LOG . warn ( "No parsers element" ) ; } else { final List < ParserConfig > parserConfigs = parsers . getList ( ) ; if ( parserConfigs == null ) { LOG . warn ( "No parsers configured" ) ; } else { for ( final ParserConfig pc : parserConfigs ) { final Parser < Object > pars = pc . getParser ( ) ; if ( pars instanceof IncrementalParser ) { final IncrementalParser < ? > parser = ( IncrementalParser < ? > ) pars ; final Object model = parser . parse ( files ) ; final List < GeneratorConfig > generatorConfigs = config . findGeneratorsForParser ( pc . getName ( ) ) ; for ( final GeneratorConfig gc : generatorConfigs ) { final Generator < Object > generator = gc . getGenerator ( ) ; generator . generate ( model , true ) ; } } else { LOG . debug ( "No incremental parser: {}" , pars . getClass ( ) . getName ( ) ) ; } } } } }
Incremental parse and generate . The class loader of this class will be used .