org.jboss.aop.joinpoint
Class FieldInvocation

java.lang.Object
  extended by org.jboss.aop.joinpoint.InvocationBase
      extended by org.jboss.aop.joinpoint.FieldInvocation
All Implemented Interfaces:
Serializable, Invocation
Direct Known Subclasses:
FieldReadInvocation, FieldWriteInvocation

public abstract class FieldInvocation
extends InvocationBase

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 field access or field update.

Version:
$Revision: 70849 $
Author:
Bill Burke
See Also:
Serialized Form

Field Summary
protected  Field field
           
protected  int index
           
 
Fields inherited from class org.jboss.aop.joinpoint.InvocationBase
advisor, currentInterceptor, instanceResolver, interceptors, metadata, responseContextInfo, targetObject
 
Constructor Summary
protected FieldInvocation(FieldInfo info, Interceptor[] interceptors)
           
  FieldInvocation(Field field, int fieldIndex, Interceptor[] interceptors)
           
protected FieldInvocation(Interceptor[] interceptors)
           
 
Method Summary
 Field getField()
          This is the field the invocation is accessing
 int getIndex()
          This is an index into the Field[] array accessed through the ClassAdvisor
 Object getMetaData(Object group, Object attr)
          This method resolves metadata based on the context of the invocation.
 Object resolveAnnotation(Class<? extends Annotation> annotation)
          This method resolves an annotation based on the context of the invocation.
<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.
 
Methods inherited from class org.jboss.aop.joinpoint.InvocationBase
addResponseAttachment, getAdvisor, getCurrentInterceptor, getInstanceResolver, getInterceptors, getMetaData, getResponseAttachment, getResponseContextInfo, getTargetObject, invokeNext, invokeNext, invokeTarget, 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
 
Methods inherited from interface org.jboss.aop.joinpoint.Invocation
copy, getWrapper
 

Field Detail

field

protected transient Field field

index

protected int index
Constructor Detail

FieldInvocation

public FieldInvocation(Field field,
                       int fieldIndex,
                       Interceptor[] interceptors)

FieldInvocation

protected FieldInvocation(Interceptor[] interceptors)

FieldInvocation

protected FieldInvocation(FieldInfo info,
                          Interceptor[] interceptors)
Method Detail

resolveAnnotation

public Object resolveAnnotation(Class<? extends Annotation> annotation)
This method resolves an annotation based on the context of the invocation.

Specified by:
resolveAnnotation in interface Invocation
Overrides:
resolveAnnotation 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:

getMetaData

public Object getMetaData(Object group,
                          Object attr)
This method resolves metadata based on the context of the invocation. It iterates through its list of MetaDataResolvers to find out the value of the metadata desired. This list usually is ThreadMetaData, InstanceAdvisor.getMetaData ClassAdvisor.getMethodMetaData (or field, or constructor) ClassAdvisor.getDefaultMetaData

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

getField

public Field getField()
This is the field the invocation is accessing

Returns:

getIndex

public int getIndex()
This is an index into the Field[] array accessed through the ClassAdvisor

Returns:


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