[jboss-user] [Javassist user questions] - Re: Duplicate a method

cat4hire do-not-reply at jboss.com
Sun Feb 10 05:47:52 EST 2008


You are not trying to duplicate, rather to overload the method. I usually do this:
1) create a StringBuffer where I place the java source code for the new method;
2) use CtNewMethod.make() to obtain a new CtMethod for the source code;
3) add the method to the CtClass.

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

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



More information about the jboss-user mailing list