Package org.springframework.aop.aspectj
Class MethodInvocationProceedingJoinPoint
java.lang.Object
org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint
- All Implemented Interfaces:
org.aspectj.lang.JoinPoint
,org.aspectj.lang.JoinPoint.StaticPart
,org.aspectj.lang.ProceedingJoinPoint
public class MethodInvocationProceedingJoinPoint
extends Object
implements org.aspectj.lang.ProceedingJoinPoint, org.aspectj.lang.JoinPoint.StaticPart
An implementation of the AspectJ
ProceedingJoinPoint
interface
wrapping an AOP Alliance MethodInvocation
.
Note: The getThis()
method returns the current Spring AOP proxy.
The getTarget()
method returns the current Spring AOP target (which may be
null
if there is no target instance) as a plain POJO without any advice.
If you want to call the object and have the advice take effect, use getThis()
.
A common example is casting the object to an introduced interface in the implementation of
an introduction. There is no such distinction between target and proxy in AspectJ itself.
- Since:
- 2.0
- Author:
- Rod Johnson, Juergen Hoeller, Adrian Colyer, Ramnivas Laddad
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.aspectj.lang.JoinPoint
org.aspectj.lang.JoinPoint.EnclosingStaticPart, org.aspectj.lang.JoinPoint.StaticPart
-
Field Summary
Fields inherited from interface org.aspectj.lang.JoinPoint
ADVICE_EXECUTION, CONSTRUCTOR_CALL, CONSTRUCTOR_EXECUTION, EXCEPTION_HANDLER, FIELD_GET, FIELD_SET, INITIALIZATION, METHOD_CALL, METHOD_EXECUTION, PREINITIALIZATION, STATICINITIALIZATION, SYNCHRONIZATION_LOCK, SYNCHRONIZATION_UNLOCK
-
Constructor Summary
ConstructorDescriptionMethodInvocationProceedingJoinPoint
(ProxyMethodInvocation methodInvocation) Create a new MethodInvocationProceedingJoinPoint, wrapping the given Spring ProxyMethodInvocation object. -
Method Summary
Modifier and TypeMethodDescriptionObject[]
getArgs()
int
getId()
getKind()
org.aspectj.lang.Signature
org.aspectj.lang.JoinPoint.StaticPart
Returns the Spring AOP target.getThis()
Returns the Spring AOP proxy.proceed()
void
set$AroundClosure
(org.aspectj.runtime.internal.AroundClosure aroundClosure) toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.aspectj.lang.ProceedingJoinPoint
stack$AroundClosure
-
Constructor Details
-
MethodInvocationProceedingJoinPoint
Create a new MethodInvocationProceedingJoinPoint, wrapping the given Spring ProxyMethodInvocation object.- Parameters:
methodInvocation
- the Spring ProxyMethodInvocation object
-
-
Method Details
-
set$AroundClosure
public void set$AroundClosure(org.aspectj.runtime.internal.AroundClosure aroundClosure) - Specified by:
set$AroundClosure
in interfaceorg.aspectj.lang.ProceedingJoinPoint
-
proceed
- Specified by:
proceed
in interfaceorg.aspectj.lang.ProceedingJoinPoint
- Throws:
Throwable
-
proceed
- Specified by:
proceed
in interfaceorg.aspectj.lang.ProceedingJoinPoint
- Throws:
Throwable
-
getThis
Returns the Spring AOP proxy. Cannot benull
.- Specified by:
getThis
in interfaceorg.aspectj.lang.JoinPoint
-
getTarget
Returns the Spring AOP target. May benull
if there is no target.- Specified by:
getTarget
in interfaceorg.aspectj.lang.JoinPoint
-
getArgs
- Specified by:
getArgs
in interfaceorg.aspectj.lang.JoinPoint
-
getSignature
public org.aspectj.lang.Signature getSignature()- Specified by:
getSignature
in interfaceorg.aspectj.lang.JoinPoint
- Specified by:
getSignature
in interfaceorg.aspectj.lang.JoinPoint.StaticPart
-
getSourceLocation
- Specified by:
getSourceLocation
in interfaceorg.aspectj.lang.JoinPoint
- Specified by:
getSourceLocation
in interfaceorg.aspectj.lang.JoinPoint.StaticPart
-
getKind
- Specified by:
getKind
in interfaceorg.aspectj.lang.JoinPoint
- Specified by:
getKind
in interfaceorg.aspectj.lang.JoinPoint.StaticPart
-
getId
public int getId()- Specified by:
getId
in interfaceorg.aspectj.lang.JoinPoint.StaticPart
-
getStaticPart
public org.aspectj.lang.JoinPoint.StaticPart getStaticPart()- Specified by:
getStaticPart
in interfaceorg.aspectj.lang.JoinPoint
-
toShortString
- Specified by:
toShortString
in interfaceorg.aspectj.lang.JoinPoint
- Specified by:
toShortString
in interfaceorg.aspectj.lang.JoinPoint.StaticPart
-
toLongString
- Specified by:
toLongString
in interfaceorg.aspectj.lang.JoinPoint
- Specified by:
toLongString
in interfaceorg.aspectj.lang.JoinPoint.StaticPart
-
toString
-