org.jboss.aop.joinpoint
Class CallerInvocation
java.lang.Object
org.jboss.aop.joinpoint.InvocationBase
org.jboss.aop.joinpoint.CallerInvocation
- All Implemented Interfaces:
- Serializable, Invocation
- Direct Known Subclasses:
- ConstructorCalledByConstructorInvocation, ConstructorCalledByMethodInvocation, MethodCalledByConstructorInvocation, MethodCalledByMethodInvocation
public abstract class CallerInvocation
- extends InvocationBase
- Version:
- $Revision: 60466 $
- Author:
- Kabir Khan
- See Also:
- Serialized Form
Methods inherited from class org.jboss.aop.joinpoint.InvocationBase |
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 |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
callingObject
protected Object callingObject
arguments
protected Object[] arguments
CallerInvocation
public CallerInvocation(Advisor advisor,
Object callingObject,
Interceptor[] interceptors)
CallerInvocation
public CallerInvocation(Object callingObject,
Interceptor[] interceptors)
getCallingObject
public Object getCallingObject()
- Returns the caller object.
- Returns:
- the caller object
getArguments
public Object[] getArguments()
- Returns a non-null array containing all call arguments.
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.
- Returns:
- the call arguments
setArguments
public void setArguments(Object[] arguments)
- Replaces call argument values by the ones contained in
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.
- Parameters:
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 © 2008 JBoss, a division of Red Hat, Inc.. All Rights Reserved.