类 AspectJAroundAdvice
- java.lang.Object
- org.springframework.aop.aspectj.AbstractAspectJAdvice
- org.springframework.aop.aspectj.AspectJAroundAdvice
- 所有已实现的接口:
Serializable,Advice,Interceptor,MethodInterceptor,AspectJPrecedenceInformation,Ordered
public class AspectJAroundAdvice extends AbstractAspectJAdvice implements MethodInterceptor, Serializable
Spring AOP around advice (MethodInterceptor) that wraps an AspectJ advice method. Exposes ProceedingJoinPoint.- 从以下版本开始:
- 2.0
- 作者:
- Rod Johnson, Juergen Hoeller
- 另请参阅:
- 序列化表格
字段概要
从类继承的字段 org.springframework.aop.aspectj.AbstractAspectJAdvice
aspectJAdviceMethod, JOIN_POINT_KEY
从接口继承的字段 org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
构造器概要
构造器 构造器 说明 AspectJAroundAdvice(Method aspectJAroundAdviceMethod, AspectJExpressionPointcut pointcut, AspectInstanceFactory aif)
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 Objectinvoke(MethodInvocation mi)Implement this method to perform extra treatments before and after the invocation.booleanisAfterAdvice()Return whether this is an after advice.booleanisBeforeAdvice()Return whether this is a before advice.protected org.aspectj.lang.ProceedingJoinPointlazyGetProceedingJoinPoint(ProxyMethodInvocation rmi)Return the ProceedingJoinPoint for the current invocation, instantiating it lazily if it hasn't been bound to the thread already.protected booleansupportsProceedingJoinPoint()从类继承的方法 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, setReturningName, setReturningNameNoCheck, setThrowingName, setThrowingNameNoCheck, toString
构造器详细资料
AspectJAroundAdvice
public AspectJAroundAdvice(Method aspectJAroundAdviceMethod, AspectJExpressionPointcut pointcut, AspectInstanceFactory aif)
方法详细资料
isBeforeAdvice
public boolean isBeforeAdvice()
从接口复制的说明:AspectJPrecedenceInformationReturn whether this is a before advice.
isAfterAdvice
public boolean isAfterAdvice()
从接口复制的说明:AspectJPrecedenceInformationReturn whether this is an after advice.
supportsProceedingJoinPoint
protected boolean supportsProceedingJoinPoint()
invoke
public Object invoke(MethodInvocation mi) throws Throwable
从接口复制的说明:MethodInterceptorImplement this method to perform extra treatments before and after the invocation. Polite implementations would certainly like to invokeJoinpoint.proceed().- 指定者:
invoke在接口中MethodInterceptor- 参数:
mi- the method invocation joinpoint- 返回:
- the result of the call to
Joinpoint.proceed(); might be intercepted by the interceptor - 抛出:
Throwable- if the interceptors or the target object throws an exception
lazyGetProceedingJoinPoint
protected org.aspectj.lang.ProceedingJoinPoint lazyGetProceedingJoinPoint(ProxyMethodInvocation rmi)
Return the ProceedingJoinPoint for the current invocation, instantiating it lazily if it hasn't been bound to the thread already.- 参数:
rmi- the current Spring AOP ReflectiveMethodInvocation, which we'll use for attribute binding- 返回:
- the ProceedingJoinPoint to make available to advice methods