public abstract static class AbstractGeneratorRunner<T extends DecisionCallback> implements Runner {
@Override
public void generate( @NotNull GeneratorConfiguration configuration ) throws IOException, JClassAlreadyExistsException {
PrintStream statusPrinter = new PrintStream( new WriterOutputStream( configuration.getLogOut() ) );
Result result = Parser.parse( configuration.getDomainSourceFiles() );
if ( result.getClassDeclarations().isEmpty() ) {
throw new IllegalStateException( "No class declarations found" );
}
for ( ClassDeclaration classDeclaration : result.getClassDeclarations() ) {
DomainObjectDescriptor descriptor = new DomainObjectDescriptorFactory( classDeclaration ).create();
generate( descriptor, configuration, statusPrinter );
}
}