ClassSourceFileComposerFactory factory = new ClassSourceFileComposerFactory(packageName, simpleSourceName);
factory.addImplementedInterface(typeName);
// imports
factory.addImport(Name.getSourceNameForClass(GWT.class));
factory.addImport(Name.getSourceNameForClass(SafeHtml.class));
factory.addImport(Name.getSourceNameForClass(SafeHtmlBuilder.class));
// Loop through the formatters declared for this type and supertypes
FormatCollector formatters = new FormatCollector(context, logger, toGenerate);
MethodCollector invokables = new MethodCollector(context, logger, toGenerate);