org.springframework.aop.aspectj
Class MethodInvocationProceedingJoinPoint

java.lang.Object
  extended by org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint

public class MethodInvocationProceedingJoinPoint
extends java.lang.Object

Implementation of 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), and is 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.

Of course there is no such distinction between target and proxy in AspectJ.

Since:
2.0
Author:
Rod Johnson, Juergen Hoeller, Adrian Colyer, Ramnivas Laddad

Nested Class Summary
private  class MethodInvocationProceedingJoinPoint.MethodSignatureImpl
          Lazily initialized MethodSignature.
private  class MethodInvocationProceedingJoinPoint.SourceLocationImpl
          Lazily initialized SourceLocation.
 
Field Summary
private  java.lang.Object[] defensiveCopyOfArgs
           
private  ProxyMethodInvocation methodInvocation
           
private  Signature signature
          Lazily initialized signature object
private  SourceLocation sourceLocation
          Lazily initialized source location object
 
Constructor Summary
MethodInvocationProceedingJoinPoint(ProxyMethodInvocation methodInvocation)
          Create a new MethodInvocationProceedingJoinPoint, wrapping the given Spring ProxyMethodInvocation object.
 
Method Summary
 java.lang.Object[] getArgs()
           
 int getId()
           
 java.lang.String getKind()
           
 Signature getSignature()
           
 SourceLocation getSourceLocation()
           
 JoinPoint.StaticPart getStaticPart()
           
 java.lang.Object getTarget()
          Returns the Spring AOP target.
 java.lang.Object getThis()
          Returns the Spring AOP proxy.
 java.lang.Object proceed()
           
 java.lang.Object proceed(java.lang.Object[] arguments)
           
 void set$AroundClosure(AroundClosure aroundClosure)
           
 java.lang.String toLongString()
           
 java.lang.String toShortString()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

methodInvocation

private final ProxyMethodInvocation methodInvocation

defensiveCopyOfArgs

private java.lang.Object[] defensiveCopyOfArgs

signature

private Signature signature
Lazily initialized signature object


sourceLocation

private SourceLocation sourceLocation
Lazily initialized source location object

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(AroundClosure aroundClosure)

proceed

public java.lang.Object proceed()
                         throws java.lang.Throwable
Throws:
java.lang.Throwable

proceed

public java.lang.Object proceed(java.lang.Object[] arguments)
                         throws java.lang.Throwable
Throws:
java.lang.Throwable

getThis

public java.lang.Object getThis()
Returns the Spring AOP proxy. Cannot be null.


getTarget

public java.lang.Object getTarget()
Returns the Spring AOP target. May be null if there is no target.


getArgs

public java.lang.Object[] getArgs()

getSignature

public Signature getSignature()

getSourceLocation

public SourceLocation getSourceLocation()

getKind

public java.lang.String getKind()

getId

public int getId()

getStaticPart

public JoinPoint.StaticPart getStaticPart()

toShortString

public java.lang.String toShortString()

toLongString

public java.lang.String toLongString()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object