public interface ProxyMethodInvocation extends MethodInvocation
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.
ReflectiveMethodInvocation
,
DelegatingIntroductionInterceptor
Modifier and Type | Method and Description |
---|---|
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.
|
getMethod
getArguments
getStaticPart, getThis, proceed
Object getProxy()
MethodInvocation invocableClone()
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.proceed()
can be called once per clone.MethodInvocation invocableClone(Object... arguments)
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.arguments
- the arguments that the cloned invocation is supposed to use,
overriding the original argumentsproceed()
can be called once per clone.void setArguments(Object... arguments)
arguments
- the argument arrayvoid setUserAttribute(String key, Object value)
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, or null
to reset itObject getUserAttribute(String key)
key
- the name of the attributenull
if not setsetUserAttribute(java.lang.String, java.lang.Object)