Package org.springframework.aop.aspectj
Class AspectJMethodBeforeAdvice
java.lang.Object
org.springframework.aop.aspectj.AbstractAspectJAdvice
org.springframework.aop.aspectj.AspectJMethodBeforeAdvice
- All Implemented Interfaces:
Serializable
,Advice
,AspectJPrecedenceInformation
,BeforeAdvice
,MethodBeforeAdvice
,Ordered
public class AspectJMethodBeforeAdvice
extends AbstractAspectJAdvice
implements MethodBeforeAdvice, Serializable
Spring AOP advice that wraps an AspectJ before method.
- Since:
- 2.0
- Author:
- Rod Johnson, Adrian Colyer
- See Also:
-
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
ConstructorDescriptionAspectJMethodBeforeAdvice
(Method aspectJBeforeAdviceMethod, AspectJExpressionPointcut pointcut, AspectInstanceFactory aif) -
Method Summary
Modifier and TypeMethodDescriptionvoid
Callback before a given method is invoked.boolean
Return whether this is an after advice.boolean
Return whether this is a before advice.Methods inherited from class 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, supportsProceedingJoinPoint, toString
-
Constructor Details
-
AspectJMethodBeforeAdvice
public AspectJMethodBeforeAdvice(Method aspectJBeforeAdviceMethod, AspectJExpressionPointcut pointcut, AspectInstanceFactory aif)
-
-
Method Details
-
before
Description copied from interface:MethodBeforeAdvice
Callback before a given method is invoked.- Specified by:
before
in interfaceMethodBeforeAdvice
- Parameters:
method
- the method being invokedargs
- the arguments to the methodtarget
- the target of the method invocation. May benull
.- Throws:
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.
-
isBeforeAdvice
public boolean isBeforeAdvice()Description copied from interface:AspectJPrecedenceInformation
Return whether this is a before advice.- Specified by:
isBeforeAdvice
in interfaceAspectJPrecedenceInformation
-
isAfterAdvice
public boolean isAfterAdvice()Description copied from interface:AspectJPrecedenceInformation
Return whether this is an after advice.- Specified by:
isAfterAdvice
in interfaceAspectJPrecedenceInformation
-