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 void write(File file, Clazz clazz) { try { FileOutputStream out = new FileOutputStream(file); out.write(clazz.getBytecode()); out.close(); } catch (IOException e) { throw new RuntimeException(e); } }