org.jboss.aop.array
Class ArrayElementInvocation

java.lang.Object
  extended by org.jboss.aop.joinpoint.InvocationBase
      extended by org.jboss.aop.array.ArrayElementInvocation
All Implemented Interfaces:
Serializable, Invocation
Direct Known Subclasses:
ArrayElementReadInvocation, ArrayElementWriteInvocation

public abstract class ArrayElementInvocation
extends InvocationBase

Version:
$Revision: 1.1 $
Author:
Kabir Khan
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.jboss.aop.joinpoint.InvocationBase
advisor, currentInterceptor, instanceResolver, interceptors, metadata, responseContextInfo, targetObject
 
Constructor Summary
ArrayElementInvocation(Interceptor[] interceptors, Object array, int index)
           
 
Method Summary
 void addResponseAttachment(Object key, Object val)
           
 Invocation copy()
          Copies complete state of Invocation object so that it could possibly be reused in a spawned thread.
 Advisor getAdvisor()
           
 List<ArrayReference> getArrayOwners()
           
 int getCurrentInterceptor()
           
 int getIndex()
           
 Object getResponseAttachment(Object key)
           
 Map<Object,Object> getResponseContextInfo()
           
 Invocation getWrapper(Interceptor[] newchain)
          Get 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.
abstract  Object invokeTarget()
          Invokes the target joinpoint for this invocation skipping any subsequent interceptors in the chain.
 Object resolveAnnotation(Class<? extends Annotation> annotation)
          Abstraction for resolving an annotation so that it can be overriden from the Method, Constructor, Field, etc.
 Object resolveAnnotation(Class<? extends Annotation>[] annotations)
          Abstraction for resolving an annotation so that it can be overriden from the Method, Constructor, Field, etc.
 Object resolveClassAnnotation(Class<? extends Annotation> annotation)
          Abstraction for resolving an annotation so that it can be overriden from the Class
 Object resolveClassMetaData(Object key, Object attr)
          Resolve class level untyped metadata based on a key and the attribute of the key
<T extends Annotation>
T
resolveTypedAnnotation(Class<T> annotation)
          Abstraction for resolving an annotation so that it can be overriden from the Method, Constructor, Field, etc.
<T extends Annotation>
T
resolveTypedAnnotation(Class<T>[] annotations)
          Abstraction for resolving an annotation so that it can be overriden from the Method, Constructor, Field, etc.
<T extends Annotation>
T
resolveTypedClassAnnotation(Class<T> annotation)
          Abstraction for resolving an annotation so that it can be overriden from the Class
 void setAdvisor(Advisor advisor)
           
 void setInstanceResolver(MetaDataResolver instanceResolver)
           
 void setResponseContextInfo(Map<Object,Object> responseContextInfo)
           
 
Methods inherited from class org.jboss.aop.joinpoint.InvocationBase
getInstanceResolver, getInterceptors, getMetaData, getMetaData, getTargetObject, invokeNext, setMetaData, setTargetObject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ArrayElementInvocation

public ArrayElementInvocation(Interceptor[] interceptors,
                              Object array,
                              int index)
Method Detail

getIndex

public int getIndex()

invokeNext

public Object invokeNext()
                  throws Throwable
Invoke on the next interceptor in the chain. If this is already the end of the chain, reflection will call the constructor, field, or method you are invoking on.

Specified by:
invokeNext in interface Invocation
Overrides:
invokeNext in class InvocationBase
Throws:
Throwable

invokeTarget

public abstract Object invokeTarget()
Description copied from class: InvocationBase
Invokes the target joinpoint for this invocation skipping any subsequent interceptors in the chain.

Specified by:
invokeTarget in interface Invocation
Overrides:
invokeTarget in class InvocationBase

addResponseAttachment

public void addResponseAttachment(Object key,
                                  Object val)
Specified by:
addResponseAttachment in interface Invocation
Overrides:
addResponseAttachment in class InvocationBase

getAdvisor

public Advisor getAdvisor()
Specified by:
getAdvisor in interface Invocation
Overrides:
getAdvisor in class InvocationBase

getCurrentInterceptor

public int getCurrentInterceptor()
Overrides:
getCurrentInterceptor in class InvocationBase

getResponseAttachment

public Object getResponseAttachment(Object key)
Specified by:
getResponseAttachment in interface Invocation
Overrides:
getResponseAttachment in class InvocationBase

getResponseContextInfo

public Map<Object,Object> getResponseContextInfo()
Specified by:
getResponseContextInfo in interface Invocation
Overrides:
getResponseContextInfo in class InvocationBase

resolveAnnotation

public Object resolveAnnotation(Class<? extends Annotation> annotation)
Description copied from interface: Invocation
Abstraction for resolving an annotation so that it can be overriden from the Method, Constructor, Field, etc.

Specified by:
resolveAnnotation in interface Invocation
Overrides:
resolveAnnotation in class InvocationBase
Returns:

resolveAnnotation

public Object resolveAnnotation(Class<? extends Annotation>[] annotations)
Description copied from interface: Invocation
Abstraction for resolving an annotation so that it can be overriden from the Method, Constructor, Field, etc.

Specified by:
resolveAnnotation in interface Invocation
Overrides:
resolveAnnotation in class InvocationBase
Returns:

resolveClassAnnotation

public Object resolveClassAnnotation(Class<? extends Annotation> annotation)
Description copied from interface: Invocation
Abstraction for resolving an annotation so that it can be overriden from the Class

Specified by:
resolveClassAnnotation in interface Invocation
Overrides:
resolveClassAnnotation in class InvocationBase
Returns:

resolveTypedAnnotation

public <T extends Annotation> T resolveTypedAnnotation(Class<T> annotation)
Description copied from interface: Invocation
Abstraction for resolving an annotation so that it can be overriden from the Method, Constructor, Field, etc.

Specified by:
resolveTypedAnnotation in interface Invocation
Overrides:
resolveTypedAnnotation in class InvocationBase
Returns:

resolveTypedAnnotation

public <T extends Annotation> T resolveTypedAnnotation(Class<T>[] annotations)
Description copied from interface: Invocation
Abstraction for resolving an annotation so that it can be overriden from the Method, Constructor, Field, etc.

Specified by:
resolveTypedAnnotation in interface Invocation
Overrides:
resolveTypedAnnotation in class InvocationBase
Returns:

resolveTypedClassAnnotation

public <T extends Annotation> T resolveTypedClassAnnotation(Class<T> annotation)
Description copied from interface: Invocation
Abstraction for resolving an annotation so that it can be overriden from the Class

Specified by:
resolveTypedClassAnnotation in interface Invocation
Overrides:
resolveTypedClassAnnotation in class InvocationBase
Returns:

resolveClassMetaData

public Object resolveClassMetaData(Object key,
                                   Object attr)
Description copied from interface: Invocation
Resolve class level untyped metadata based on a key and the attribute of the key

Specified by:
resolveClassMetaData in interface Invocation
Overrides:
resolveClassMetaData in class InvocationBase
Returns:

setAdvisor

public void setAdvisor(Advisor advisor)
Overrides:
setAdvisor in class InvocationBase

setInstanceResolver

public void setInstanceResolver(MetaDataResolver instanceResolver)
Overrides:
setInstanceResolver in class InvocationBase

setResponseContextInfo

public void setResponseContextInfo(Map<Object,Object> responseContextInfo)
Specified by:
setResponseContextInfo in interface Invocation
Overrides:
setResponseContextInfo in class InvocationBase

copy

public Invocation copy()
Description copied from interface: Invocation
Copies complete state of Invocation object so that it could possibly be reused in a spawned thread.

Returns:

getWrapper

public Invocation getWrapper(Interceptor[] newchain)
Description copied from interface: Invocation
Get a wrapper invocation object that can insert a new chain of interceptors at runtime to the invocation flow. CFlow makes use of this. When the wrapper object finishes its invocation chain it delegates back to the wrapped invocation.

Returns:

getArrayOwners

public List<ArrayReference> getArrayOwners()


Copyright © 2008 JBoss, a division of Red Hat, Inc.. All Rights Reserved.