Top Description Inners Fields Constructors Methods
org.springframework.aop.aspectj

public Class MethodInvocationProceedingJoinPoint

extends Object
implements ProceedingJoinPoint, StaticPart
Class Inheritance
All Implemented Interfaces
org.aspectj.lang.JoinPoint.StaticPart, org.aspectj.lang.ProceedingJoinPoint, org.aspectj.lang.JoinPoint
Imports
java.lang.reflect.Method, .Modifier, org.aspectj.lang.JoinPoint, .ProceedingJoinPoint, .Signature, org.aspectj.lang.reflect.MethodSignature, .SourceLocation, org.aspectj.runtime.internal.AroundClosure, org.springframework.aop.ProxyMethodInvocation, org.springframework.core.DefaultParameterNameDiscoverer, .ParameterNameDiscoverer, org.springframework.lang.Nullable, org.springframework.util.Assert

An implementation of the AspectJ ProceedingJoinPoint interface wrapping an AOP Alliance org.aopalliance.intercept.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.

Authors
Rod Johnson, Juergen Hoeller, Adrian Colyer, Ramnivas Laddad
Since
2.0

Nested and Inner Type Summary

Modifier and TypeClass and Description
private class
private class

Field Summary

Modifier and TypeField and Description
private Object[]
private final ProxyMethodInvocation
private static final ParameterNameDiscoverer
private Signature
signature

Lazily initialized signature object.

private SourceLocation
sourceLocation

Lazily initialized source location object.

Constructor Summary

AccessConstructor and Description
public
MethodInvocationProceedingJoinPoint(ProxyMethodInvocation
the Spring ProxyMethodInvocation object
methodInvocation
)

Create a new MethodInvocationProceedingJoinPoint, wrapping the given Spring ProxyMethodInvocation object.

Method Summary

Modifier and TypeMethod and Description
public Object[]
public int
getId()

Implements org.aspectj.lang.JoinPoint.StaticPart.getId.

Return the id for this JoinPoint.StaticPart.
public String
getKind()

Implements org.aspectj.lang.JoinPoint.getKind, org.aspectj.lang.JoinPoint.StaticPart.getKind.

This string is guaranteed to be interned.
public Signature
getSignature()

Implements org.aspectj.lang.JoinPoint.getSignature, org.aspectj.lang.JoinPoint.StaticPart.getSignature.

getStaticPart().getSignature() returns the same object
public SourceLocation
getSourceLocation()

Implements org.aspectj.lang.JoinPoint.getSourceLocation, org.aspectj.lang.JoinPoint.StaticPart.getSourceLocation.

Returns the source location corresponding to the join point.
public JoinPoint.StaticPart
public Object
getTarget()

Implements org.aspectj.lang.JoinPoint.getTarget.

Returns the Spring AOP target.
public Object
getThis()

Implements org.aspectj.lang.JoinPoint.getThis.

Returns the Spring AOP proxy.
public Object
proceed()

Implements org.aspectj.lang.ProceedingJoinPoint.proceed.

Proceed with the next advice or target method invocation
public Object
proceed(Object[]
the arguments to proceed with
arguments
)

Implements org.aspectj.lang.ProceedingJoinPoint.proceed.

Proceed with the next advice or target method invocation.
public void
set$AroundClosure(AroundClosure
the around closure to associate with this joinpoint
aroundClosure
)

Implements org.aspectj.lang.ProceedingJoinPoint.set$AroundClosure.

The joinpoint needs to know about its closure so that proceed can delegate to closure.run().
public String
public String
public String
toString()

Overrides java.lang.Object.toString.

Implements org.aspectj.lang.JoinPoint.toString, org.aspectj.lang.JoinPoint.StaticPart.toString.

Returns a string representation of the object.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

argsback to summary
private Object[] args
Annotations
@Nullable
methodInvocationback to summary
private final ProxyMethodInvocation methodInvocation
parameterNameDiscovererback to summary
private static final ParameterNameDiscoverer parameterNameDiscoverer
signatureback to summary
private Signature signature

Lazily initialized signature object.

Annotations
@Nullable
sourceLocationback to summary
private SourceLocation sourceLocation

Lazily initialized source location object.

Annotations
@Nullable

Constructor Detail

MethodInvocationProceedingJoinPointback to summary
public MethodInvocationProceedingJoinPoint(ProxyMethodInvocation methodInvocation)

Create a new MethodInvocationProceedingJoinPoint, wrapping the given Spring ProxyMethodInvocation object.

Parameters
methodInvocation:ProxyMethodInvocation

the Spring ProxyMethodInvocation object

Method Detail

getArgsback to summary
public Object[] getArgs()

Implements org.aspectj.lang.JoinPoint.getArgs.

Returns:Object[]

Doc from org.aspectj.lang.JoinPoint.getArgs.

the arguments at this join point

Annotations
@Override
getIdback to summary
public int getId()

Implements org.aspectj.lang.JoinPoint.StaticPart.getId.

Doc from org.aspectj.lang.JoinPoint.StaticPart.getId.

Return the id for this JoinPoint.StaticPart. All JoinPoint.StaticPart instances are assigned an id number upon creation. For each advised type the id numbers start at 0.
The id is guaranteed to remain constant across repeated executions of a program but may change if the code is recompiled.
The benefit of having an id is that it can be used for array index purposes which can be quicker than using the JoinPoint.StaticPart object itself in a map lookup.
Since two JoinPoint.StaticPart instances in different advised types may have the same id, then if the id is being used to index some joinpoint specific state then that state must be maintained on a pertype basis - either by using pertypewithin() or an ITD.

Returns:int

the id of this joinpoint

Annotations
@Override
getKindback to summary
public String getKind()

Implements org.aspectj.lang.JoinPoint.getKind, org.aspectj.lang.JoinPoint.StaticPart.getKind.

Doc from org.aspectj.lang.JoinPoint.getKind.

This string is guaranteed to be interned. getStaticPart().getKind() returns the same object.

Returns:String

Doc from org.aspectj.lang.JoinPoint.StaticPart.getKind.

a string representing the kind of join point. This String is guaranteed to be interned

Annotations
@Override
getSignatureback to summary
public Signature getSignature()

Implements org.aspectj.lang.JoinPoint.getSignature, org.aspectj.lang.JoinPoint.StaticPart.getSignature.

Doc from org.aspectj.lang.JoinPoint.getSignature.

getStaticPart().getSignature() returns the same object

Returns:Signature

Doc from org.aspectj.lang.JoinPoint.StaticPart.getSignature.

the signature at the join point.

Annotations
@Override
getSourceLocationback to summary
public SourceLocation getSourceLocation()

Implements org.aspectj.lang.JoinPoint.getSourceLocation, org.aspectj.lang.JoinPoint.StaticPart.getSourceLocation.

Doc from org.aspectj.lang.JoinPoint.StaticPart.getSourceLocation.

Returns the source location corresponding to the join point. If there is no source location available, returns null.

Returns:SourceLocation

the SourceLocation of the defining class for default constructors

Annotations
@Override
getStaticPartback to summary
public JoinPoint.StaticPart getStaticPart()

Implements org.aspectj.lang.JoinPoint.getStaticPart.

Returns:JoinPoint.StaticPart

Doc from org.aspectj.lang.JoinPoint.getStaticPart.

an object that encapsulates the static parts of this join point.

Annotations
@Override
getTargetback to summary
public Object getTarget()

Implements org.aspectj.lang.JoinPoint.getTarget.

Returns the Spring AOP target. May be null if there is no target.

Returns:Object

Doc from org.aspectj.lang.JoinPoint.getTarget.

the target object (or null if there isn't one)

Annotations
@Override
@Nullable
getThisback to summary
public Object getThis()

Implements org.aspectj.lang.JoinPoint.getThis.

Returns the Spring AOP proxy. Cannot be null.

Returns:Object

Doc from org.aspectj.lang.JoinPoint.getThis.

the currently executing object (or null if not available - e.g. static context)

Annotations
@Override
proceedback to summary
public Object proceed() throws Throwable

Implements org.aspectj.lang.ProceedingJoinPoint.proceed.

Doc from org.aspectj.lang.ProceedingJoinPoint.proceed.

Proceed with the next advice or target method invocation

Returns:Object

the result of proceeding

Annotations
@Override
@Nullable
Exceptions
Throwable:
if the invoked proceed throws anything
proceedback to summary
public Object proceed(Object[] arguments) throws Throwable

Implements org.aspectj.lang.ProceedingJoinPoint.proceed.

Doc from org.aspectj.lang.ProceedingJoinPoint.proceed.

Proceed with the next advice or target method invocation. Unlike code style, proceed(..) in annotation style places different requirements on the parameters passed to it. The proceed(..) call takes, in this order:

  • If 'this()' was used in the pointcut for binding, it must be passed first in proceed(..).
  • If 'target()' was used in the pointcut for binding, it must be passed next in proceed(..) - it will be the first argument to proceed(..) if this() was not used for binding.
  • Finally come all the arguments expected at the join point, in the order they are supplied at the join point. Effectively the advice signature is ignored - it doesn't matter if a subset of arguments were bound or the ordering was changed in the advice signature, the proceed(..) calls takes all of them in the right order for the join point.
Since proceed(..) in this case takes an Object array, AspectJ cannot do as much compile time checking as it can for code style. If the rules above aren't obeyed then it will unfortunately manifest as a runtime error.
Parameters
arguments:Object[]

the arguments to proceed with

Returns:Object

the result of proceeding

Annotations
@Override
@Nullable
Exceptions
Throwable:
if the invoked proceed throws anything
set$AroundClosureback to summary
public void set$AroundClosure(AroundClosure aroundClosure)

Implements org.aspectj.lang.ProceedingJoinPoint.set$AroundClosure.

Doc from org.aspectj.lang.ProceedingJoinPoint.set$AroundClosure.

The joinpoint needs to know about its closure so that proceed can delegate to closure.run(). This internal method should not be called directly, and won't be visible to the end-user when packed in a jar (synthetic method).

Parameters
aroundClosure:AroundClosure

the around closure to associate with this joinpoint

Annotations
@Override
toLongStringback to summary
public String toLongString()

Implements org.aspectj.lang.JoinPoint.toLongString, org.aspectj.lang.JoinPoint.StaticPart.toLongString.

Returns:String

Doc from org.aspectj.lang.JoinPoint.StaticPart.toLongString.

an extended string representation of the join point

Annotations
@Override
toShortStringback to summary
public String toShortString()

Implements org.aspectj.lang.JoinPoint.toShortString, org.aspectj.lang.JoinPoint.StaticPart.toShortString.

Returns:String

Doc from org.aspectj.lang.JoinPoint.StaticPart.toShortString.

an abbreviated string representation of the join point

Annotations
@Override
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Implements org.aspectj.lang.JoinPoint.toString, org.aspectj.lang.JoinPoint.StaticPart.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object.

Annotations
@Override
org.springframework.aop.aspectj back to summary

private Class MethodInvocationProceedingJoinPoint.MethodSignatureImpl

extends Object
implements MethodSignature
Class Inheritance
  • java.lang.Object
  • org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.MethodSignatureImpl
All Implemented Interfaces
org.aspectj.lang.reflect.MethodSignature, org.aspectj.lang.reflect.CodeSignature, org.aspectj.lang.reflect.MemberSignature, org.aspectj.lang.Signature

Lazily initialized MethodSignature.

Field Summary

Modifier and TypeField and Description
private volatile String[]

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
private void
appendType(StringBuilder sb, Class<?> type, boolean useLongTypeName)

private void
appendTypes(StringBuilder sb, Class<?>[] types, boolean includeArgs, boolean useLongReturnAndArgumentTypeName)

public Class<?>
getDeclaringType()

Implements org.aspectj.lang.Signature.getDeclaringType.

Returns a java.lang.Class object representing the class, interface, or aspect that declared this member.

public String
getDeclaringTypeName()

Implements org.aspectj.lang.Signature.getDeclaringTypeName.

This is equivalent to calling getDeclaringType().getName(), but caches the result for greater efficiency.
public Class<?>[]
public Method
public int
getModifiers()

Implements org.aspectj.lang.Signature.getModifiers.

Returns the modifiers on this signature represented as an int.
public String
public String[]
public Class<?>[]
public Class<?>
public String
public String
public String
toString()

Overrides java.lang.Object.toString.

Implements org.aspectj.lang.Signature.toString.

Returns a string representation of the object.
private String
toString(boolean includeModifier, boolean includeReturnTypeAndArgs, boolean useLongReturnAndArgumentTypeName, boolean useLongTypeName)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

parameterNamesback to summary
private volatile String[] parameterNames
Annotations
@Nullable

Constructor Detail

MethodSignatureImplback to summary
private MethodSignatureImpl()

Method Detail

appendTypeback to summary
private void appendType(StringBuilder sb, Class<?> type, boolean useLongTypeName)
appendTypesback to summary
private void appendTypes(StringBuilder sb, Class<?>[] types, boolean includeArgs, boolean useLongReturnAndArgumentTypeName)
getDeclaringTypeback to summary
public Class<?> getDeclaringType()

Implements org.aspectj.lang.Signature.getDeclaringType.

Doc from org.aspectj.lang.Signature.getDeclaringType.

Returns a java.lang.Class object representing the class, interface, or aspect that declared this member. For intra-member declarations, this will be the type on which the member is declared, not the type where the declaration is lexically written. Use SourceLocation.getWithinType() to get the type in which the declaration occurs lexically.

For consistency with java.lang.reflect.Member, this method should have been named getDeclaringClass().

Returns:Class<?>

the class, interface or aspect that declared this member

Annotations
@Override
getDeclaringTypeNameback to summary
public String getDeclaringTypeName()

Implements org.aspectj.lang.Signature.getDeclaringTypeName.

Doc from org.aspectj.lang.Signature.getDeclaringTypeName.

This is equivalent to calling getDeclaringType().getName(), but caches the result for greater efficiency.

Returns:String

the fully qualified name of the declaring type

Annotations
@Override
getExceptionTypesback to summary
public Class<?>[] getExceptionTypes()

Implements org.aspectj.lang.reflect.CodeSignature.getExceptionTypes.

Annotations
@Override
getMethodback to summary
public Method getMethod()

Implements org.aspectj.lang.reflect.MethodSignature.getMethod.

Annotations
@Override
getModifiersback to summary
public int getModifiers()

Implements org.aspectj.lang.Signature.getModifiers.

Doc from org.aspectj.lang.Signature.getModifiers.

Returns the modifiers on this signature represented as an int. Use the constants and helper methods defined on java.lang.reflect.Modifier to manipulate this, i.e.

    // check if this signature is public
    java.lang.reflect.Modifier.isPublic(sig.getModifiers());

    // print out the modifiers
    java.lang.reflect.Modifier.toString(sig.getModifiers());
Returns:int

the modifiers on this signature represented as an int

Annotations
@Override
getNameback to summary
public String getName()

Implements org.aspectj.lang.Signature.getName.

Returns:String

Doc from org.aspectj.lang.Signature.getName.

the identifier part of this signature. For methods this will return the method name.

Annotations
@Override
getParameterNamesback to summary
public String[] getParameterNames()

Implements org.aspectj.lang.reflect.CodeSignature.getParameterNames.

Annotations
@Override
@Nullable
getParameterTypesback to summary
public Class<?>[] getParameterTypes()

Implements org.aspectj.lang.reflect.CodeSignature.getParameterTypes.

Annotations
@Override
getReturnTypeback to summary
public Class<?> getReturnType()

Implements org.aspectj.lang.reflect.MethodSignature.getReturnType.

Annotations
@Override
toLongStringback to summary
public String toLongString()

Implements org.aspectj.lang.Signature.toLongString.

Returns:String

Doc from org.aspectj.lang.Signature.toLongString.

an extended string representation of this signature.

Annotations
@Override
toShortStringback to summary
public String toShortString()

Implements org.aspectj.lang.Signature.toShortString.

Returns:String

Doc from org.aspectj.lang.Signature.toShortString.

an abbreviated string representation of this signature.

Annotations
@Override
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Implements org.aspectj.lang.Signature.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object.

Annotations
@Override
toStringback to summary
private String toString(boolean includeModifier, boolean includeReturnTypeAndArgs, boolean useLongReturnAndArgumentTypeName, boolean useLongTypeName)
org.springframework.aop.aspectj back to summary

private Class MethodInvocationProceedingJoinPoint.SourceLocationImpl

extends Object
implements SourceLocation
Class Inheritance
  • java.lang.Object
  • org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.SourceLocationImpl
All Implemented Interfaces
org.aspectj.lang.reflect.SourceLocation

Lazily initialized SourceLocation.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public int
public String
public int
public Class<?>
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

SourceLocationImplback to summary
private SourceLocationImpl()

Method Detail

getColumnback to summary
public int getColumn()

Implements org.aspectj.lang.reflect.SourceLocation.getColumn.

Deprecated

Returns:int

Doc from org.aspectj.lang.reflect.SourceLocation.getColumn.

the column

Annotations
@Override
@Deprecated
getFileNameback to summary
public String getFileName()

Implements org.aspectj.lang.reflect.SourceLocation.getFileName.

Annotations
@Override
getLineback to summary
public int getLine()

Implements org.aspectj.lang.reflect.SourceLocation.getLine.

Annotations
@Override
getWithinTypeback to summary
public Class<?> getWithinType()

Implements org.aspectj.lang.reflect.SourceLocation.getWithinType.

Annotations
@Override