Top Description Methods
org.springframework.aop

public Interface ProxyMethodInvocation

extends MethodInvocation
Known Direct Implementers
org.springframework.aop.framework.ReflectiveMethodInvocation
Imports
org.aopalliance.intercept.MethodInvocation, org.springframework.lang.Nullable

Extension of the AOP Alliance org.aopalliance.intercept.MethodInvocation interface, allowing access to the proxy that the method invocation was made through.

Useful to be able to substitute return values with the proxy, if necessary, for example if the invocation target returned itself.

Authors
Juergen Hoeller, Adrian Colyer
Since
1.1.3
See Also
org.springframework.aop.framework.ReflectiveMethodInvocation, org.springframework.aop.support.DelegatingIntroductionInterceptor

Method Summary

Modifier and TypeMethod and Description
public Object

Returns:

the original proxy object
getProxy
()

Return the proxy that this method invocation was made through.

public Object

Returns:

the value of the attribute, or null if not set
getUserAttribute
(String
the name of the attribute
key
)

Return the value of the specified user attribute.

public MethodInvocation

Returns:

an invocable clone of this invocation. proceed() can be called once per clone.
invocableClone
()

Create a clone of this object.

public MethodInvocation

Returns:

an invocable clone of this invocation. proceed() can be called once per clone.
invocableClone
(Object...
the arguments that the cloned invocation is supposed to use, overriding the original arguments
arguments
)

Create a clone of this object.

public void
setArguments(Object...
the argument array
arguments
)

Set the arguments to be used on subsequent invocations in the any advice in this chain.

public void
setUserAttribute(String
the name of the attribute
key
,
Object
the value of the attribute, or null to reset it
value
)

Add the specified user attribute with the given value to this invocation.

Inherited from org.aopalliance.intercept.MethodInvocation:
getMethod

Method Detail

getProxyback to summary
public Object getProxy()

Return the proxy that this method invocation was made through.

Returns:Object

the original proxy object

getUserAttributeback to summary
public Object getUserAttribute(String key)

Return the value of the specified user attribute.

Parameters
key:String

the name of the attribute

Returns:Object

the value of the attribute, or null if not set

Annotations
@Nullable
See Also
setUserAttribute
invocableCloneback to summary
public MethodInvocation invocableClone()

Create a clone of this object. If cloning is done before proceed() is invoked on this object, proceed() can be invoked once per clone to invoke the joinpoint (and the rest of the advice chain) more than once.

Returns:MethodInvocation

an invocable clone of this invocation. proceed() can be called once per clone.

invocableCloneback to summary
public MethodInvocation invocableClone(Object... arguments)

Create a clone of this object. If cloning is done before proceed() is invoked on this object, proceed() can be invoked once per clone to invoke the joinpoint (and the rest of the advice chain) more than once.

Parameters
arguments:Object[]

the arguments that the cloned invocation is supposed to use, overriding the original arguments

Returns:MethodInvocation

an invocable clone of this invocation. proceed() can be called once per clone.

setArgumentsback to summary
public void setArguments(Object... arguments)

Set the arguments to be used on subsequent invocations in the any advice in this chain.

Parameters
arguments:Object[]

the argument array

setUserAttributeback to summary
public void setUserAttribute(String key, Object value)

Add the specified user attribute with the given value to this invocation.

Such attributes are not used within the AOP framework itself. They are just kept as part of the invocation object, for use in special interceptors.

Parameters
key:String

the name of the attribute

value:Object

the value of the attribute, or null to reset it