|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jboss.aop.joinpoint.InvocationBase org.jboss.aop.joinpoint.ConstructorInvocation
public class ConstructorInvocation
This is a helper wrapper class for an Invocation object. It is used to add or get values or metadata that pertains to an AOP Constructor interception.
Field Summary | |
---|---|
protected Object[] |
arguments
|
protected Constructor<?> |
constructor
|
Fields inherited from class org.jboss.aop.joinpoint.InvocationBase |
---|
advisor, currentInterceptor, instanceResolver, interceptors, metadata, responseContextInfo, targetObject |
Constructor Summary | |
---|---|
ConstructorInvocation(ConstructorInfo info,
Interceptor[] interceptors)
|
|
ConstructorInvocation(Interceptor[] interceptors)
|
Method Summary | ||
---|---|---|
Invocation |
copy()
Copies complete state of Invocation object. |
|
Object[] |
getArguments()
Returns a non-null array containing all constructor arguments. |
|
Constructor<?> |
getConstructor()
|
|
Object |
getMetaData(Object group,
Object attr)
This method resolves metadata based on the context of the invocation. |
|
Invocation |
getWrapper(Interceptor[] newchain)
Returns a wrapper invocation object that can insert a new chain of interceptors at runtime to the invocation flow. |
|
Object |
invokeNext()
Invoke on the next interceptor in the chain. |
|
Object |
invokeTarget()
Invokes the target joinpoint for this invocation skipping any subsequent interceptors in the chain. |
|
Object |
resolveAnnotation(Class<? extends Annotation> annotation)
This method resolves an annotation based on the context of the invocation. |
|
|
resolveTypedAnnotation(Class<T> annotation)
Abstraction for resolving an annotation so that it can be overriden from the Method, Constructor, Field, etc. |
|
void |
setArguments(Object[] arguments)
Replaces constructor argument values by the ones contained in
arguments . |
|
void |
setConstructor(Constructor<?> constructor)
|
Methods inherited from class org.jboss.aop.joinpoint.InvocationBase |
---|
addResponseAttachment, getAdvisor, getCurrentInterceptor, getInstanceResolver, getInterceptors, getMetaData, getResponseAttachment, getResponseContextInfo, getTargetObject, invokeNext, resolveAnnotation, resolveClassAnnotation, resolveClassMetaData, 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 |
Field Detail |
---|
protected Object[] arguments
protected transient Constructor<?> constructor
Constructor Detail |
---|
public ConstructorInvocation(Interceptor[] interceptors)
public ConstructorInvocation(ConstructorInfo info, Interceptor[] interceptors)
Method Detail |
---|
public Object invokeNext() throws Throwable
invokeNext
in interface Invocation
invokeNext
in class InvocationBase
Throwable
public Object invokeTarget() throws Throwable
invokeTarget
in interface Invocation
invokeTarget
in class InvocationBase
Throwable
public Object resolveAnnotation(Class<? extends Annotation> annotation)
resolveAnnotation
in interface Invocation
resolveAnnotation
in class InvocationBase
public <T extends Annotation> T resolveTypedAnnotation(Class<T> annotation)
Invocation
resolveTypedAnnotation
in interface Invocation
resolveTypedAnnotation
in class InvocationBase
public Object getMetaData(Object group, Object attr)
getMetaData
in interface Invocation
getMetaData
in class InvocationBase
public Invocation getWrapper(Interceptor[] newchain)
newchain
- chain of interceptors to be inserted on invocation
public Invocation copy()
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 invokeNext()
,
InvocationBase.invokeNext(Interceptor[])
, or 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 constructor
arguments. The size of this array must be the same as the one
of getArguments()
, as well as the element types.public Constructor<?> getConstructor()
public void setConstructor(Constructor<?> constructor)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |