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 AspectJProceedingJoinPoint
interface wrapping an AOP AllianceMethodInvocation
.Note: The
getThis()
method returns the current Spring AOP proxy. ThegetTarget()
method returns the current Spring AOP target (which may benull
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, usegetThis()
. 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
Constructor Summary
Constructors Constructor Description MethodInvocationProceedingJoinPoint(ProxyMethodInvocation methodInvocation)
Create a new MethodInvocationProceedingJoinPoint, wrapping the given Spring ProxyMethodInvocation object.
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object[]
getArgs()
int
getId()
String
getKind()
org.aspectj.lang.Signature
getSignature()
SourceLocation
getSourceLocation()
org.aspectj.lang.JoinPoint.StaticPart
getStaticPart()
Object
getTarget()
Returns the Spring AOP target.Object
getThis()
Returns the Spring AOP proxy.Object
proceed()
Object
proceed(Object[] arguments)
void
set$AroundClosure(org.aspectj.runtime.internal.AroundClosure aroundClosure)
String
toLongString()
String
toShortString()
String
toString()
Constructor Detail
MethodInvocationProceedingJoinPoint
public MethodInvocationProceedingJoinPoint(ProxyMethodInvocation methodInvocation)
Create a new MethodInvocationProceedingJoinPoint, wrapping the given Spring ProxyMethodInvocation object.- Parameters:
methodInvocation
- the Spring ProxyMethodInvocation object
Method Detail
set$AroundClosure
public void set$AroundClosure(org.aspectj.runtime.internal.AroundClosure aroundClosure)
- Specified by:
set$AroundClosure
in interfaceorg.aspectj.lang.ProceedingJoinPoint
proceed
public Object proceed() throws Throwable
- Specified by:
proceed
in interfaceorg.aspectj.lang.ProceedingJoinPoint
- Throws:
Throwable
proceed
public Object proceed(Object[] arguments) throws Throwable
- Specified by:
proceed
in interfaceorg.aspectj.lang.ProceedingJoinPoint
- Throws:
Throwable
getThis
public Object getThis()
Returns the Spring AOP proxy. Cannot benull
.- Specified by:
getThis
in interfaceorg.aspectj.lang.JoinPoint
getTarget
public Object getTarget()
Returns the Spring AOP target. May benull
if there is no target.- Specified by:
getTarget
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
public SourceLocation getSourceLocation()
- Specified by:
getSourceLocation
in interfaceorg.aspectj.lang.JoinPoint
- Specified by:
getSourceLocation
in interfaceorg.aspectj.lang.JoinPoint.StaticPart
getKind
public String 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
public String toShortString()
- Specified by:
toShortString
in interfaceorg.aspectj.lang.JoinPoint
- Specified by:
toShortString
in interfaceorg.aspectj.lang.JoinPoint.StaticPart
toLongString
public String toLongString()
- Specified by:
toLongString
in interfaceorg.aspectj.lang.JoinPoint
- Specified by:
toLongString
in interfaceorg.aspectj.lang.JoinPoint.StaticPart