protected void generate( @NotNull DomainObjectDescriptor descriptor, @NotNull GeneratorConfiguration configuration, @NotNull PrintStream statusPrinter ) throws JClassAlreadyExistsException, IOException {
//Create the source files
if ( configuration.getCreationMode().isCreate() ) {
configuration.getLogOut().append( "Generating JAXB classes...\n" );
CodeGenerator codeGenerator = new CodeGenerator( new StubDecisionCallback() );
new Generator( codeGenerator, descriptor ).generate();
codeGenerator.getModel().build( configuration.getDestination(), configuration.getResourcesDestination(), statusPrinter );
}
//Generate the tests
if ( configuration.getCreationMode().isCreateTests() ) {
configuration.getLogOut().append( "Generating tests...\n" );
CodeGenerator codeGenerator = new CodeGenerator( new StubDecisionCallback() );
new TestGenerator( codeGenerator, descriptor ).generateTest();
codeGenerator.getModel().build( configuration.getTestDestination(), configuration.getTestResourcesDestination(), statusPrinter );
}
}