use of javassist.util.HotSwapper in project yyl_example by Relucent.
the class JdwpTest method main.
public static void main(String[] args) throws IOException, IllegalConnectorArgumentsException, CannotCompileException, NotFoundException {
ClassPool pool = ClassPool.getDefault();
CtClass cc = pool.makeClass("yyl.test.TestClass");
CtField cf = new CtField(pool.get("java.lang.String"), "name", cc);
cc.addField(cf);
HotSwapper hs = new HotSwapper(1234);
hs.reload(cc.getName(), cc.toBytecode());
cc.toClass();
}
Aggregations