Hi,
I want to intercept all methods of an interface. OK, no problem - implement a MethodInterceptor - done.
But my interceptor should implement this interface too. How can I dispatch the methods of my adviced class to the methods of my interceptor?
Thank youCode:interface Foo { Object method1(Object o, String s); void method2(Date d, int i); } class FooImpl implements Foo { Object method1(Object o, String s) {...} void method2(Date d, int i) {...} } class FooInterceptor implements MethodInterceptor, Foo { Object invoke(MethodInvocation methodinvocation) throws Throwable { // how can I dispatch here automatically to method1 and method2? } Object method1(Object o, String s) {...} void method2(Date d, int i) {...} }


Reply With Quote
why is the interceptor implementing Foo interface?
