String factoryName = classElement.getQualifiedName().toString() + "Factory";
String factorySimpleName = classElement.getSimpleName().toString() + "Factory";
String objectSimpleName = classElement.getSimpleName().toString();
processingEnv.getMessager().printMessage(Diagnostic.Kind.NOTE, "Generating factory file for " + classElement.getQualifiedName().toString());
PackageElement packageElement = (PackageElement) classElement.getEnclosingElement();
try
{
JavaFileObject factoryFile = filer.createSourceFile(factoryName);
PrintWriter pw = new PrintWriter(new OutputStreamWriter(factoryFile.openOutputStream(), "UTF-8"));
pw.println("/*");
for(String headerLine : License.LICENSE)
{
pw.println(" *" + headerLine);
}
pw.println(" */");
pw.println();
pw.print("package ");
pw.print(packageElement.getQualifiedName());
pw.println(";");
pw.println();
pw.println("import org.apache.qpid.server.BrokerOptions;");
pw.println("import org.apache.qpid.server.configuration.updater.TaskExecutor;");