1 8 package test.aopalliance.aspect; 9 10 import test.aopalliance.Test; 11 import org.aopalliance.intercept.MethodInterceptor; 12 import org.aopalliance.intercept.MethodInvocation; 13 14 19 public class TestInterceptor implements MethodInterceptor { 20 21 public Object invoke(MethodInvocation invocation) throws Throwable { 22 Test.log("before-intercept "); 23 Test.log(invocation.getMethod().getName() + ' '); 24 Test.log(invocation.getThis().getClass().getName() + ' '); 25 invocation.getArguments(); 26 Object rval = invocation.proceed(); 27 Test.log("after-intercept "); 28 return rval; 29 } 30 } 31 | Popular Tags |