Shouldn't that work?
class Foo {
| Object foo() {
| return new Object();
| }
| }
|
| public class Main {
| public static void main(String[] args) throws NotFoundException,
CannotCompileException {
| ClassPool cp = ClassPool.getDefault();
|
What about
classPool.importPackage(java.net);
?
View the original post :
http://www.jboss.org/index.html?module=bbop=viewtopicp=4254638#4254638
Reply to the post :
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=4254638
___
Hi all!
This is my first post here and I am a javassist newbie. So hopefully my problem
can easily be solved.
From a real usecase, I condensed the following fragment demonstrating my
problem:
ClassPool cp = ClassPool.getDefault();
| CtClass cl = cp.getCtClass(jatest.Test);
| CtMethod m =