ByteArrayFileManager bafm = new ByteArrayFileManager(
compiler.getStandardFileManager(null, null, null), targetClass);
StringWriter sw = new StringWriter();
CompilationTask task = compiler.getTask(sw, bafm, diagnosticsCollector, OPTIONS, null,
compilationUnits);
task.call();
return targetClass.toByteArray();
}
// wrapper class - not really a 'FileObject', uses in-memory string 'source'
class JavaSourceFromString extends SimpleJavaFileObject {