Does anyone know if it is possible to write a interceptor can help adding argument to a method call transparently?
e.g. xxxMethod(Arg 1)
finally return, it is
xxxMethod(Arg 1, Arg 2)
Anyone can give me some hints?
Thanks a million! :oops:
Does anyone know if it is possible to write a interceptor can help adding argument to a method call transparently?
e.g. xxxMethod(Arg 1)
finally return, it is
xxxMethod(Arg 1, Arg 2)
Anyone can give me some hints?
Thanks a million! :oops:
Beginner of Spring!
You can redirect a method call from one method to another, returning the value of the target method. So you could redirect from foo(String) to foo(String, int). However, the foo(String, int) method must exist - a MethodInterceptor wll not allow you to add new methods to an object.
You can make an object implement additional methods defined on a interface using introductions. See section 5.3.2.5 for more info on introductions.
Rob