public abstract class CallerInvocation extends InvocationBase
Modifier and Type | Field and Description |
---|---|
protected Object[] |
arguments |
protected Object |
callingObject |
advisor, currentInterceptor, instanceResolver, interceptors, metadata, responseContextInfo, targetObject
Constructor and Description |
---|
CallerInvocation(Advisor advisor,
Object callingObject,
Interceptor[] interceptors) |
CallerInvocation(Object callingObject,
Interceptor[] interceptors) |
Modifier and Type | Method and Description |
---|---|
Object[] |
getArguments()
Returns a non-null array containing all call arguments.
|
Object |
getCallingObject()
Returns the caller object.
|
void |
setArguments(Object[] arguments)
Replaces call argument values by the ones contained in
arguments . |
addResponseAttachment, getAdvisor, getCurrentInterceptor, getInstanceResolver, getInterceptors, getMetaData, getMetaData, getResponseAttachment, getResponseContextInfo, getTargetObject, invokeNext, invokeNext, invokeTarget, resolveAnnotation, resolveAnnotation, resolveClassAnnotation, resolveClassMetaData, resolveTypedAnnotation, resolveTypedAnnotation, resolveTypedClassAnnotation, setAdvisor, setInstanceResolver, setMetaData, setResponseContextInfo, setTargetObject
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
copy, getWrapper
public CallerInvocation(Advisor advisor, Object callingObject, Interceptor[] interceptors)
public CallerInvocation(Object callingObject, Interceptor[] interceptors)
public Object getCallingObject()
public Object[] getArguments()
The returned array can be changed by the advice or interceptor accordingly. All
changes are reflected on joinpoint execution, and are noticed as well by
other advices and interceptors that are executed after the current one.
However, changes to this array are limited to the scope of current advice
execution, and must be performed before execution of InvocationBase.invokeNext()
,
InvocationBase.invokeNext(Interceptor[])
, or InvocationBase.invokeTarget()
method.
Otherwise, inconsistency on joinpoint argument values may be noticed.
public void setArguments(Object[] arguments)
arguments
.
Advices and interceptors must be aware that, for performance reasons,
this array does not get copied across; its reference is directly used instead.
Hence, changes to arguments
array after this method being called
are forbidden. Otherwise, inconsistency on joinpoint argument values may be
noticed.
arguments
- a non-null array containing the new values of call arguments.
The size of this array must be the same as the one of
getArguments()
, as well as the element types.Copyright © 2013 JBoss, a division of Red Hat, Inc.. All Rights Reserved.