public interface

ProxyMethodInvocation

org.springframework.aop.ProxyMethodInvocation
Known Indirect Subclasses

Class Overview

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.

Summary

Public Methods
abstract Object getProxy()
Return the proxy that this method invocation was made through.
abstract Object getUserAttribute(String key)
Return the value of the specified user attribute.
abstract MethodInvocation invocableClone()
Create a clone of this object.
abstract MethodInvocation invocableClone(Object[] arguments)
Create a clone of this object.
abstract void setArguments(Object[] arguments)
Set the arguments to be used on subsequent invocations in the any advice in this chain.
abstract void setUserAttribute(String key, Object value)
Add the specified user attribute with the given value to this invocation.

Public Methods

public abstract Object getProxy ()

Return the proxy that this method invocation was made through.

Returns
  • the original proxy object

public abstract Object getUserAttribute (String key)

Return the value of the specified user attribute.

Parameters
key the name of the attribute
Returns
  • the value of the attribute, or null if not set

public abstract 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
  • an invocable clone of this invocation. proceed() can be called once per clone.

public abstract 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 the arguments that the cloned invocation is supposed to use, overriding the original arguments
Returns
  • an invocable clone of this invocation. proceed() can be called once per clone.

public abstract void setArguments (Object[] arguments)

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

Parameters
arguments the argument array

public abstract 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 the name of the attribute
value the value of the attribute, or null to reset it