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 |
---|---|
java.lang.Object |
getProxy()
Return the proxy that this method invocation was made through.
|
java.lang.Object |
getUserAttribute(java.lang.String key)
Return the value of the specified user attribute.
|
MethodInvocation |
invocableClone()
Create a clone of this object.
|
MethodInvocation |
invocableClone(java.lang.Object... arguments)
Create a clone of this object.
|
void |
setArguments(java.lang.Object... arguments)
Set the arguments to be used on subsequent invocations in the any advice
in this chain.
|
void |
setUserAttribute(java.lang.String key,
java.lang.Object value)
Add the specified user attribute with the given value to this invocation.
|
getMethod
getArguments
getStaticPart, getThis, proceed
java.lang.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(java.lang.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(java.lang.Object... arguments)
arguments
- the argument arrayvoid setUserAttribute(java.lang.String key, @Nullable java.lang.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 it@Nullable java.lang.Object getUserAttribute(java.lang.String key)
key
- the name of the attributenull
if not setsetUserAttribute(java.lang.String, java.lang.Object)