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 java.lang.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 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 interface org.aspectj.lang.ProceedingJoinPoint
      • proceed

        public java.lang.Object proceed()
                                 throws java.lang.Throwable
        Specified by:
        proceed in interface org.aspectj.lang.ProceedingJoinPoint
        Throws:
        java.lang.Throwable
      • proceed

        public java.lang.Object proceed(java.lang.Object[] arguments)
                                 throws java.lang.Throwable
        Specified by:
        proceed in interface org.aspectj.lang.ProceedingJoinPoint
        Throws:
        java.lang.Throwable
      • getThis

        public java.lang.Object getThis()
        Returns the Spring AOP proxy. Cannot be null.
        Specified by:
        getThis in interface org.aspectj.lang.JoinPoint
      • getTarget

        @Nullable
        public java.lang.Object getTarget()
        Returns the Spring AOP target. May be null if there is no target.
        Specified by:
        getTarget in interface org.aspectj.lang.JoinPoint
      • getArgs

        public java.lang.Object[] getArgs()
        Specified by:
        getArgs in interface org.aspectj.lang.JoinPoint
      • getSignature

        public org.aspectj.lang.Signature getSignature()
        Specified by:
        getSignature in interface org.aspectj.lang.JoinPoint
        Specified by:
        getSignature in interface org.aspectj.lang.JoinPoint.StaticPart
      • getSourceLocation

        public SourceLocation getSourceLocation()
        Specified by:
        getSourceLocation in interface org.aspectj.lang.JoinPoint
        Specified by:
        getSourceLocation in interface org.aspectj.lang.JoinPoint.StaticPart
      • getKind

        public java.lang.String getKind()
        Specified by:
        getKind in interface org.aspectj.lang.JoinPoint
        Specified by:
        getKind in interface org.aspectj.lang.JoinPoint.StaticPart
      • getId

        public int getId()
        Specified by:
        getId in interface org.aspectj.lang.JoinPoint.StaticPart
      • getStaticPart

        public org.aspectj.lang.JoinPoint.StaticPart getStaticPart()
        Specified by:
        getStaticPart in interface org.aspectj.lang.JoinPoint
      • toShortString

        public java.lang.String toShortString()
        Specified by:
        toShortString in interface org.aspectj.lang.JoinPoint
        Specified by:
        toShortString in interface org.aspectj.lang.JoinPoint.StaticPart
      • toLongString

        public java.lang.String toLongString()
        Specified by:
        toLongString in interface org.aspectj.lang.JoinPoint
        Specified by:
        toLongString in interface org.aspectj.lang.JoinPoint.StaticPart
      • toString

        public java.lang.String toString()
        Specified by:
        toString in interface org.aspectj.lang.JoinPoint
        Specified by:
        toString in interface org.aspectj.lang.JoinPoint.StaticPart
        Overrides:
        toString in class java.lang.Object