[jboss-user] [Javassist user questions] - Best Practice for 'Wrapping' a Method

parkinm do-not-reply at jboss.com
Wed Apr 16 11:09:02 EDT 2008


Hi, 

Sorry if this question has been answered in another thread - please point me to the relevent answer if this has already been answered.

In Section 4 of the java assist tutorial it gives an example where a method is 'wapped'in another method, i.e.:

void move(int newX, int newY) { x = newX; y = newY; }
  | 
  | void move(int newX, int newY, int newZ) {
  |           // do what you want with newZ.
  |           move(newX, newY);
  | }

What is the best practice to do add the second method to a class in Javassist given bytecode containing the first method?

Many thanks,

Michael.

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

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



More information about the jboss-user mailing list