[jboss-user] [Javassist Users] - what happened to $r?

2009-09-28 Thread Herkules000
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(); |

[jboss-user] [Javassist Users] - Re: How to add an import statement

2009-09-11 Thread Herkules000
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 ___

[jboss-user] [Javassist Users] - VerifyError with addLocalVariable() and insertAfter()

2009-09-10 Thread Herkules000
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 =