1 16 17 package org.springframework.aop.aspectj; 18 19 import java.lang.reflect.Method ; 20 21 import org.aopalliance.intercept.MethodInterceptor; 22 import org.aopalliance.intercept.MethodInvocation; 23 24 import org.springframework.aop.AfterAdvice; 25 26 32 public class AspectJAfterAdvice extends AbstractAspectJAdvice implements MethodInterceptor, AfterAdvice { 33 34 public AspectJAfterAdvice( 35 Method aspectJBeforeAdviceMethod, AspectJExpressionPointcut pointcut, AspectInstanceFactory aif) { 36 37 super(aspectJBeforeAdviceMethod, pointcut, aif); 38 } 39 40 public Object invoke(MethodInvocation mi) throws Throwable { 41 try { 42 return mi.proceed(); 43 } 44 finally { 45 invokeAdviceMethod(getJoinPointMatch(), null, null); 46 } 47 } 48 49 public boolean isBeforeAdvice() { 50 return false; 51 } 52 53 public boolean isAfterAdvice() { 54 return true; 55 } 56 57 } 58 | Popular Tags |