接口 ProxyMethodInvocation
- 所有超级接口:
Invocation
,Joinpoint
,MethodInvocation
- 所有已知实现类:
ReflectiveMethodInvocation
public interface ProxyMethodInvocation extends MethodInvocation
Extension of the AOP AllianceMethodInvocation
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.
- 从以下版本开始:
- 1.1.3
- 作者:
- Juergen Hoeller, Adrian Colyer
- 另请参阅:
ReflectiveMethodInvocation
,DelegatingIntroductionInterceptor
方法概要
所有方法 实例方法 抽象方法 修饰符和类型 方法 说明 Object
getProxy()
Return the proxy that this method invocation was made through.Object
getUserAttribute(String key)
Return the value of the specified user attribute.MethodInvocation
invocableClone()
Create a clone of this object.MethodInvocation
invocableClone(Object... arguments)
Create a clone of this object.void
setArguments(Object... arguments)
Set the arguments to be used on subsequent invocations in the any advice in this chain.void
setUserAttribute(String key, Object value)
Add the specified user attribute with the given value to this invocation.从接口继承的方法 org.aopalliance.intercept.Invocation
getArguments
从接口继承的方法 org.aopalliance.intercept.Joinpoint
getStaticPart, getThis, proceed
从接口继承的方法 org.aopalliance.intercept.MethodInvocation
getMethod
方法详细资料
getProxy
Object getProxy()
Return the proxy that this method invocation was made through.- 返回:
- the original proxy object
invocableClone
MethodInvocation invocableClone()
Create a clone of this object. If cloning is done beforeproceed()
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.- 返回:
- an invocable clone of this invocation.
proceed()
can be called once per clone.
invocableClone
MethodInvocation invocableClone(Object... arguments)
Create a clone of this object. If cloning is done beforeproceed()
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.- 参数:
arguments
- the arguments that the cloned invocation is supposed to use, overriding the original arguments- 返回:
- an invocable clone of this invocation.
proceed()
can be called once per clone.
setArguments
void setArguments(Object... arguments)
Set the arguments to be used on subsequent invocations in the any advice in this chain.- 参数:
arguments
- the argument array
setUserAttribute
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.
- 参数:
key
- the name of the attributevalue
- the value of the attribute, ornull
to reset it
getUserAttribute
Object getUserAttribute(String key)
Return the value of the specified user attribute.- 参数:
key
- the name of the attribute- 返回:
- the value of the attribute, or
null
if not set - 另请参阅:
setUserAttribute(java.lang.String, java.lang.Object)