[jboss-user] [JBoss AOP] - Re: Manipulating method parameters

shanmoon do-not-reply at jboss.com
Fri Aug 4 16:08:29 EDT 2006


I'm new to AOP myself, but the MethodInvocation class has methods to set and get Arguments. So, in your interceptor, I would guess you could do something like:

public Object invoke(Invocation arg0) throws Throwable {
       MethodInvocation mi = (MethodInvocation)arg0; 
       Object[] methodArgs mi.getArguemts();
       //manipulate your arguments
       //and return em to the calling method
       return arg0.invokeNext();
}



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

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



More information about the jboss-user mailing list