Top Description Fields Constructors Methods
org.springframework.aop.aspectj

public Class AspectJAroundAdvice

extends AbstractAspectJAdvice
implements MethodInterceptor, Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable, org.aopalliance.intercept.MethodInterceptor, org.aopalliance.intercept.Interceptor, org.aopalliance.aop.Advice
Annotations
@SuppressWarnings:serial
Imports
java.io.Serializable, java.lang.reflect.Method, org.aopalliance.intercept.MethodInterceptor, .MethodInvocation, org.aspectj.lang.ProceedingJoinPoint, org.aspectj.weaver.tools.JoinPointMatch, org.springframework.aop.ProxyMethodInvocation, org.springframework.lang.Nullable

Spring AOP around advice (MethodInterceptor) that wraps an AspectJ advice method. Exposes ProceedingJoinPoint.
Authors
Rod Johnson, Juergen Hoeller
Since
2.0

Field Summary

Inherited from org.springframework.aop.aspectj.AbstractAspectJAdvice:
aspectJAdviceMethodJOIN_POINT_KEY

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public Object
invoke(MethodInvocation
the method invocation joinpoint
mi
)

Implements org.aopalliance.intercept.MethodInterceptor.invoke.

Implement this method to perform extra treatments before and after the invocation.

public boolean
public boolean
protected ProceedingJoinPoint

Returns:

the ProceedingJoinPoint to make available to advice methods
lazyGetProceedingJoinPoint
(ProxyMethodInvocation
the current Spring AOP ReflectiveMethodInvocation, which we'll use for attribute binding
rmi
)

Return the ProceedingJoinPoint for the current invocation, instantiating it lazily if it hasn't been bound to the thread already.

protected boolean
Inherited from org.springframework.aop.aspectj.AbstractAspectJAdvice:
argBindingbuildSafePointcutcalculateArgumentBindingscreateParameterNameDiscoverercurrentJoinPointgetAspectClassLoadergetAspectInstanceFactorygetAspectJAdviceMethodgetAspectNamegetDeclarationOrdergetDiscoveredReturningGenericTypegetDiscoveredReturningTypegetDiscoveredThrowingTypegetJoinPointgetJoinPointMatchgetJoinPointMatchgetOrdergetPointcutinvokeAdviceMethodinvokeAdviceMethodinvokeAdviceMethodWithGivenArgssetArgumentNamessetArgumentNamesFromStringArraysetAspectNamesetDeclarationOrdersetReturningNamesetReturningNameNoChecksetThrowingNamesetThrowingNameNoChecktoString

Constructor Detail

AspectJAroundAdviceback to summary
public AspectJAroundAdvice(Method aspectJAroundAdviceMethod, AspectJExpressionPointcut pointcut, AspectInstanceFactory aif)

Method Detail

invokeback to summary
public Object invoke(MethodInvocation mi) throws Throwable

Implements org.aopalliance.intercept.MethodInterceptor.invoke.

Doc from org.aopalliance.intercept.MethodInterceptor.invoke.

Implement this method to perform extra treatments before and after the invocation. Polite implementations would certainly like to invoke Joinpoint#proceed().

Parameters
mi:MethodInvocation

the method invocation joinpoint

Returns:Object

the result of the call to Joinpoint#proceed(); might be intercepted by the interceptor

Annotations
@Override
@Nullable
Exceptions
Throwable:
if the interceptors or the target object throws an exception
isAfterAdviceback to summary
public boolean isAfterAdvice()

Implements org.springframework.aop.aspectj.AspectJPrecedenceInformation.isAfterAdvice.

Doc from org.springframework.aop.aspectj.AspectJPrecedenceInformation.isAfterAdvice.

Return whether this is an after advice.

Annotations
@Override
isBeforeAdviceback to summary
public boolean isBeforeAdvice()

Implements org.springframework.aop.aspectj.AspectJPrecedenceInformation.isBeforeAdvice.

Doc from org.springframework.aop.aspectj.AspectJPrecedenceInformation.isBeforeAdvice.

Return whether this is a before advice.

Annotations
@Override
lazyGetProceedingJoinPointback to summary
protected 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:ProxyMethodInvocation

the current Spring AOP ReflectiveMethodInvocation, which we'll use for attribute binding

Returns:ProceedingJoinPoint

the ProceedingJoinPoint to make available to advice methods

supportsProceedingJoinPointback to summary
protected boolean supportsProceedingJoinPoint()

Overrides org.springframework.aop.aspectj.AbstractAspectJAdvice.supportsProceedingJoinPoint.

Annotations
@Override