Hi,
     I am trying to write a wrapper for the instrumented methods and print out the 
parameters ($1, $2 .... according to the javassist manual). The following is an 
extract of my code:

CtMethod mnew = CtNewMethod.copy(mold, methodName, clazz, null);
StringBuffer body = new StringBuffer();
       :
body.append(nname + "($$);\n");
       :
body.append("{ System.out.println($1); }");
mnew.setBody(body.toString());
clazz.addMethod(mnew);


And I am getting the following javassist compiling error, any clues out there. I am 
using version 2.6.

javassist.CannotCompileException: [source error] no such field: $1
        at javassist.CtBehavior.setBody(CtBehavior.java:163)
        at javassist.CtMethod.setBody(CtMethod.java:311)


Any info will be appreciated.

John

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3833998#3833998

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3833998


-------------------------------------------------------
This SF.Net email is sponsored by Sleepycat Software
Learn developer strategies Cisco, Motorola, Ericsson & Lucent use to 
deliver higher performing products faster, at low TCO.
http://www.sleepycat.com/telcomwpreg.php?From=osdnemail3
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to