private Clazz load(File file) { ClassNode node = AsmUtils.loadAsClassNode(file); Clazz clazz = new Clazz(node.name); clazz.setBytecode(AsmUtils.toBytecode(node)); clazz.setClassLoader(compilerClassLoader); return clazz; }
public Class findClass(String className) throws ClassNotFoundException { String filename = className.replace('.', '/') + ".class"; File file = new File(rootDirectory, filename); if (!file.exists()) { return super.findClass(className); } ClassNode node = AsmUtils.loadAsClassNode(file); byte[] bytecode = AsmUtils.toBytecode(node); return defineClass(className, bytecode, 0, bytecode.length, null); }