类 AspectJAfterReturningAdvice
- java.lang.Object
- org.springframework.aop.aspectj.AbstractAspectJAdvice
- org.springframework.aop.aspectj.AspectJAfterReturningAdvice
- 所有已实现的接口:
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.- 从以下版本开始:
- 2.0
- 作者:
- Rod Johnson, Juergen Hoeller, Ramnivas Laddad
- 另请参阅:
- 序列化表格
字段概要
从类继承的字段 org.springframework.aop.aspectj.AbstractAspectJAdvice
aspectJAdviceMethod, JOIN_POINT_KEY
从接口继承的字段 org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
构造器概要
构造器 构造器 说明 AspectJAfterReturningAdvice(Method aspectJBeforeAdviceMethod, AspectJExpressionPointcut pointcut, AspectInstanceFactory aif)
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 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)
从类继承的方法 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
构造器详细资料
AspectJAfterReturningAdvice
public AspectJAfterReturningAdvice(Method aspectJBeforeAdviceMethod, AspectJExpressionPointcut pointcut, AspectInstanceFactory aif)
方法详细资料
isBeforeAdvice
public boolean isBeforeAdvice()
从接口复制的说明:AspectJPrecedenceInformation
Return whether this is a before advice.
isAfterAdvice
public boolean isAfterAdvice()
从接口复制的说明:AspectJPrecedenceInformation
Return whether this is an after advice.
setReturningName
public void setReturningName(String name)
afterReturning
public void afterReturning(Object returnValue, Method method, Object[] args, Object target) throws Throwable
从接口复制的说明:AfterReturningAdvice
Callback after a given method successfully returned.- 指定者:
afterReturning
在接口中AfterReturningAdvice
- 参数:
returnValue
- the value returned by the method, if anymethod
- method being invokedargs
- arguments to the methodtarget
- target of the method invocation. May benull
.- 抛出:
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.