System.out.println(dump.toString());
JavaCompiler jc = javax.tools.ToolProvider.getSystemJavaCompiler();
List<StringFileObject> compilationUnits = Arrays.asList(new StringFileObject(javaClassName, target.toString()));
StoringClassLoader loader = new StoringClassLoader(this.getClass().getClassLoader());
StoringFileManager sfm = new StoringFileManager(jc.getStandardFileManager(null, null, null),
loader);
StringFileObject sfo = new StringFileObject(javaClassName, target.toString());
sfm.putFileForInput(StandardLocation.SOURCE_PATH, "", javaClassName, sfo);
JavaCompiler.CompilationTask ct = jc.getTask(null, sfm, null, null, null, Arrays.asList(sfo));
if (!ct.call())
throw new RuntimeException();
loader.applyTransformer(name->name.equals(javaClassName), cw -> new ClassVisitor(Opcodes.ASM5, new CheckClassAdapter(cw)) {
@Override
public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) {
if (!name.equals("<init>"))
return super.visitMethod(access, name, desc, signature, exceptions);