// print writer if null, source code has ALREADY been generated, return
if (printWriter == null) return;
// init composer, set class properties, create source writer
ClassSourceFileComposerFactory composerFactory =
new ClassSourceFileComposerFactory(packageName, className);
// Imports
composerFactory.addImport("org.jboss.as.console.client.widgets.forms.*");
composerFactory.addImport("java.util.*");
// Interfaces
composerFactory.addImplementedInterface("org.jboss.as.console.client.widgets.forms.PropertyMetaData");
// SourceWriter
SourceWriter sourceWriter = composerFactory.createSourceWriter(context, printWriter);
// fields
generateFields(sourceWriter);
// ctor