}
// now code generate and compile the JAR
if (result) {
// filer implementation writes binary .xsd and generated source to disk
final ClassCollector classCollector = context.get(ClassCollector.class);
FilerImpl filer = new FilerImpl(classesDir, srcDir,
null, verbose, false) {
public Writer createSourceFile(String typename) throws IOException {
String tn = typename;
if (tn.contains("$")) {
tn = tn.substring(0, tn.indexOf('$'));
}
String pkg = tn.substring(0, tn.lastIndexOf('.'));
tn = tn.substring(tn.lastIndexOf('.') + 1);
classCollector.addTypesClassName(pkg, tn, pkg + "." + tn);
return super.createSourceFile(typename);
}
};
// currently just for schemaCodePrinter