You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1234567891011 |
- import javassist.*;
-
- public class Test {
- public static void main(String[] args) throws Exception {
- ClassPool cp = ClassPool.getDefault();
- CtClass cc = cp.get("test5.DefaultMethod");
- CtMethod m = CtNewMethod.make("public int run(){ return test5.DefaultMethodIntf.super.foo(); }", cc);
- cc.addMethod(m);
- cc.writeFile();
- }
- }
|