(String className, String method)
| 14 | loader = new ClassLoader(this.getClass().getClassLoader()) {}; |
| 15 | } |
| 16 | public Class<?> load(String className, String method) { |
| 17 | // System.out.println(method); |
| 18 | CtClass cc = cpool.makeClass(className); |
| 19 | try { |
| 20 | cc.addMethod(CtMethod.make(method, cc)); |
| 21 | return cc.toClass(loader, null); |
| 22 | } catch (CannotCompileException e) { |
| 23 | throw new StoneException(e.getMessage()); |
| 24 | } |
| 25 | } |
| 26 | } |