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 AspectJProceedingJoinPointinterface wrapping an AOP AllianceMethodInvocation.Note: The
getThis()method returns the current Spring AOP proxy. ThegetTarget()method returns the current Spring AOP target (which may benullif 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()intgetId()StringgetKind()org.aspectj.lang.SignaturegetSignature()SourceLocationgetSourceLocation()org.aspectj.lang.JoinPoint.StaticPartgetStaticPart()ObjectgetTarget()Returns the Spring AOP target.ObjectgetThis()Returns the Spring AOP proxy.Objectproceed()Objectproceed(Object[] arguments)voidset$AroundClosure(org.aspectj.runtime.internal.AroundClosure aroundClosure)StringtoLongString()StringtoShortString()StringtoString()
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$AroundClosurein interfaceorg.aspectj.lang.ProceedingJoinPoint
proceed
public Object proceed() throws Throwable
- Specified by:
proceedin interfaceorg.aspectj.lang.ProceedingJoinPoint- Throws:
Throwable
proceed
public Object proceed(Object[] arguments) throws Throwable
- Specified by:
proceedin interfaceorg.aspectj.lang.ProceedingJoinPoint- Throws:
Throwable
getThis
public Object getThis()
Returns the Spring AOP proxy. Cannot benull.- Specified by:
getThisin interfaceorg.aspectj.lang.JoinPoint
getTarget
public Object getTarget()
Returns the Spring AOP target. May benullif there is no target.- Specified by:
getTargetin interfaceorg.aspectj.lang.JoinPoint
getSignature
public org.aspectj.lang.Signature getSignature()
- Specified by:
getSignaturein interfaceorg.aspectj.lang.JoinPoint- Specified by:
getSignaturein interfaceorg.aspectj.lang.JoinPoint.StaticPart
getSourceLocation
public SourceLocation getSourceLocation()
- Specified by:
getSourceLocationin interfaceorg.aspectj.lang.JoinPoint- Specified by:
getSourceLocationin interfaceorg.aspectj.lang.JoinPoint.StaticPart
getKind
public String getKind()
- Specified by:
getKindin interfaceorg.aspectj.lang.JoinPoint- Specified by:
getKindin interfaceorg.aspectj.lang.JoinPoint.StaticPart
getId
public int getId()
- Specified by:
getIdin interfaceorg.aspectj.lang.JoinPoint.StaticPart
getStaticPart
public org.aspectj.lang.JoinPoint.StaticPart getStaticPart()
- Specified by:
getStaticPartin interfaceorg.aspectj.lang.JoinPoint
toShortString
public String toShortString()
- Specified by:
toShortStringin interfaceorg.aspectj.lang.JoinPoint- Specified by:
toShortStringin interfaceorg.aspectj.lang.JoinPoint.StaticPart
toLongString
public String toLongString()
- Specified by:
toLongStringin interfaceorg.aspectj.lang.JoinPoint- Specified by:
toLongStringin interfaceorg.aspectj.lang.JoinPoint.StaticPart