public class AspectJAfterReturningAdvice extends AbstractAspectJAdvice implements AfterReturningAdvice, AfterAdvice
aspectJAdviceMethod, JOIN_POINT_KEY
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
Constructor and Description |
---|
AspectJAfterReturningAdvice(Method aspectJBeforeAdviceMethod,
AspectJExpressionPointcut pointcut,
AspectInstanceFactory aif) |
Modifier and Type | Method and Description |
---|---|
void |
afterReturning(Object returnValue,
Method method,
Object[] args,
Object target)
Callback after a given method successfully returned.
|
boolean |
isAfterAdvice()
Return whether this is an after advice.
|
boolean |
isBeforeAdvice()
Return whether this is a before advice.
|
void |
setReturningName(String name) |
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
public AspectJAfterReturningAdvice(Method aspectJBeforeAdviceMethod, AspectJExpressionPointcut pointcut, AspectInstanceFactory aif)
public boolean isBeforeAdvice()
AspectJPrecedenceInformation
isBeforeAdvice
in interface AspectJPrecedenceInformation
public boolean isAfterAdvice()
AspectJPrecedenceInformation
isAfterAdvice
in interface AspectJPrecedenceInformation
public void setReturningName(String name)
setReturningName
in class AbstractAspectJAdvice
public void afterReturning(Object returnValue, Method method, Object[] args, Object target) throws Throwable
AfterReturningAdvice
afterReturning
in interface AfterReturningAdvice
returnValue
- the value returned by the method, if anymethod
- method being invokedargs
- arguments to the methodtarget
- target of the method invocation. May be null
.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.