Package org.springframework.aop.aspectj
Class AspectJAfterReturningAdvice
java.lang.Object
org.springframework.aop.aspectj.AbstractAspectJAdvice
org.springframework.aop.aspectj.AspectJAfterReturningAdvice
- All Implemented Interfaces:
Serializable,Advice,AfterAdvice,AfterReturningAdvice,AspectJPrecedenceInformation,Ordered
public class AspectJAfterReturningAdvice
extends AbstractAspectJAdvice
implements AfterReturningAdvice, AfterAdvice, Serializable
Spring AOP advice wrapping an AspectJ after-returning advice method.
- Since:
- 2.0
- Author:
- Rod Johnson, Juergen Hoeller, Ramnivas Laddad
- See Also:
-
Field Summary
Fields inherited from class org.springframework.aop.aspectj.AbstractAspectJAdvice
aspectJAdviceMethod, JOIN_POINT_KEYFields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE -
Constructor Summary
ConstructorsConstructorDescriptionAspectJAfterReturningAdvice(Method aspectJBeforeAdviceMethod, AspectJExpressionPointcut pointcut, AspectInstanceFactory aif) -
Method Summary
Modifier and TypeMethodDescriptionvoidafterReturning(Object returnValue, Method method, Object[] args, Object target) Callback after a given method successfully returned.booleanReturn whether this is an after advice.booleanReturn whether this is a before advice.voidsetReturningName(String name) Methods inherited from class org.springframework.aop.aspectj.AbstractAspectJAdvice
argBinding, buildSafePointcut, calculateArgumentBindings, createParameterNameDiscoverer, currentJoinPoint, getAspectClassLoader, getAspectInstanceFactory, getAspectJAdviceMethod, getAspectName, getDeclarationOrder, getDiscoveredReturningGenericType, getDiscoveredReturningType, getDiscoveredThrowingType, getJoinPoint, getJoinPointMatch, getJoinPointMatch, getOrder, getPointcut, invokeAdviceMethod, invokeAdviceMethod, invokeAdviceMethodWithGivenArgs, setArgumentNames, setArgumentNamesFromStringArray, setAspectName, setDeclarationOrder, setReturningNameNoCheck, setThrowingName, setThrowingNameNoCheck, supportsProceedingJoinPoint, toString
-
Constructor Details
-
AspectJAfterReturningAdvice
public AspectJAfterReturningAdvice(Method aspectJBeforeAdviceMethod, AspectJExpressionPointcut pointcut, AspectInstanceFactory aif)
-
-
Method Details
-
isBeforeAdvice
public boolean isBeforeAdvice()Description copied from interface:AspectJPrecedenceInformationReturn whether this is a before advice.- Specified by:
isBeforeAdvicein interfaceAspectJPrecedenceInformation
-
isAfterAdvice
public boolean isAfterAdvice()Description copied from interface:AspectJPrecedenceInformationReturn whether this is an after advice.- Specified by:
isAfterAdvicein interfaceAspectJPrecedenceInformation
-
setReturningName
- Overrides:
setReturningNamein classAbstractAspectJAdvice
-
afterReturning
public void afterReturning(@Nullable Object returnValue, Method method, Object[] args, @Nullable Object target) throws Throwable Description copied from interface:AfterReturningAdviceCallback after a given method successfully returned.- Specified by:
afterReturningin interfaceAfterReturningAdvice- Parameters:
returnValue- the value returned by the method, if anymethod- the method being invokedargs- the arguments to the methodtarget- the target of the method invocation. May benull.- Throws:
Throwable- if this object wishes to abort the call. Any exception thrown will be returned to the caller if it's allowed by the method signature. Otherwise the exception will be wrapped as a runtime exception.
-