String qualifiedCanonicalName = persistenceUnit.getQualifiedCanonicalName(qualifiedName);
String canonicalName = getName(qualifiedCanonicalName);
String canonicalpackage = getPackage(qualifiedCanonicalName);
JavaFileObject file = processingEnv.getFiler().createSourceFile(qualifiedCanonicalName, element);
writer = file.openWriter();
// Print the package if we have one.
if (! canonicalpackage.equals("")) {
writer.append("package " + canonicalpackage + ";\n\n");
}