站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > Spring Framework 2.0.5 API 文档英文版

AspectJAroundAdvice (Spring Framework API 2.0) - Spring Framework 2.0.5 API 文档英文版

The Spring Framework

org.springframework.aop.aspectj
Class AspectJAroundAdvice

java.lang.Object
  extended by org.springframework.aop.aspectj.AbstractAspectJAdvice
      extended by org.springframework.aop.aspectj.AspectJAroundAdvice
All Implemented Interfaces:
Advice, Interceptor, MethodInterceptor, AspectJPrecedenceInformation, Ordered

public class AspectJAroundAdvice
extends AbstractAspectJAdvice
implements MethodInterceptor

Spring AOP around advice (MethodInterceptor) that wraps an AspectJ advice method. Exposes ProceedingJoinPoint.

Since:
2.0
Author:
Rod Johnson, Juergen Hoeller

Field Summary
 
Fields inherited from class org.springframework.aop.aspectj.AbstractAspectJAdvice
aspectJAdviceMethod, JOIN_POINT_KEY
 
Fields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
 
Constructor Summary
AspectJAroundAdvice(Method aspectJAroundAdviceMethod, AspectJExpressionPointcut pointcut, AspectInstanceFactory aif)
           
 
Method Summary
 Object invoke(MethodInvocation mi)
           
 boolean isAfterAdvice()
          Return whether this is an after advice.
 boolean isBeforeAdvice()
          Return whether this is a before advice.
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.
 
Methods inherited from class org.springframework.aop.aspectj.AbstractAspectJAdvice
argBinding, buildSafePointcut, calculateArgumentBindings, createParameterNameDiscoverer, currentJoinPoint, getAspectInstanceFactory, getAspectJAdviceMethod, getAspectName, getDeclarationOrder, getDiscoveredReturningType, getDiscoveredThrowingType, getJoinPoint, getJoinPointMatch, getJoinPointMatch, getOrder, getPointcut, invokeAdviceMethod, invokeAdviceMethod, invokeAdviceMethodWithGivenArgs, setArgumentNames, setArgumentNamesFromStringArray, setAspectName, setDeclarationOrder, setReturningName, setReturningNameNoCheck, setThrowingName, setThrowingNameNoCheck, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AspectJAroundAdvice

public AspectJAroundAdvice(Method aspectJAroundAdviceMethod,
                           AspectJExpressionPointcut pointcut,
                           AspectInstanceFactory aif)
Method Detail

isBeforeAdvice

public boolean isBeforeAdvice()
Description copied from interface: AspectJPrecedenceInformation
Return whether this is a before advice.

Specified by:
isBeforeAdvice in interface AspectJPrecedenceInformation

isAfterAdvice

public boolean isAfterAdvice()
Description copied from interface: AspectJPrecedenceInformation
Return whether this is an after advice.

Specified by:
isAfterAdvice in interface AspectJPrecedenceInformation

invoke

public Object invoke(MethodInvocation mi)
              throws Throwable
Specified by:
invoke in interface MethodInterceptor
Throws:
Throwable

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.

Parameters:
rmi - the current Spring AOP ReflectiveMethodInvocation, which we'll use for attribute binding
Returns:
the ProceedingJoinPoint to make available to advice methods

The Spring Framework

Copyright © 2002-2007 The Spring Framework.