org.jboss.webbeans.introspector
Class ForwardingAnnotatedField<T>
java.lang.Object
org.jboss.webbeans.introspector.ForwardingAnnotatedItem<T,S>
org.jboss.webbeans.introspector.ForwardingAnnotatedMember<T,java.lang.reflect.Field>
org.jboss.webbeans.introspector.ForwardingAnnotatedField<T>
- All Implemented Interfaces:
- AnnotatedField<T>, AnnotatedItem<T,java.lang.reflect.Field>, AnnotatedMember<T,java.lang.reflect.Field>
- Direct Known Subclasses:
- FieldInjectionPoint, WrappedAnnotatedField
public abstract class ForwardingAnnotatedField<T>
- extends ForwardingAnnotatedMember<T,java.lang.reflect.Field>
- implements AnnotatedField<T>
|
Method Summary |
protected abstract AnnotatedField<T> |
delegate()
Gets the annotated item |
T |
get(java.lang.Object instance)
|
java.lang.reflect.Field |
getAnnotatedField()
Gets the annotated field |
AnnotatedType<?> |
getDeclaringClass()
Gets an abstraction of the declaring class |
java.lang.String |
getPropertyName()
Gets the property name of the field |
boolean |
isTransient()
|
void |
set(java.lang.Object declaringInstance,
java.lang.Object value)
Injects an instance |
void |
setOnInstance(java.lang.Object declaringInstance,
java.lang.Object value)
Injects into the field using the value provided by the manager
Unlike #set(Object, Manager) the field injected into is
discovered from the declaring instance. |
AnnotatedField<T> |
wrap(java.util.Set<java.lang.annotation.Annotation> annotations)
|
| Methods inherited from class org.jboss.webbeans.introspector.ForwardingAnnotatedItem |
equals, getActualTypeArguments, getAnnotation, getAnnotationsAsSet, getAnnotationStore, getBindingTypes, getBindingTypesAsArray, getDeclaredMetaAnnotations, getMetaAnnotations, getMetaAnnotationsAsArray, getName, getType, hashCode, isAnnotationPresent, isAssignableFrom, isAssignableFrom, isDeclaredAnnotationPresent, isFinal, isProxyable, isPublic, isStatic, toString |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.jboss.webbeans.introspector.AnnotatedItem |
getActualTypeArguments, getAnnotation, getAnnotationsAsSet, getAnnotationStore, getBindingTypes, getBindingTypesAsArray, getDeclaredMetaAnnotations, getMetaAnnotations, getMetaAnnotationsAsArray, getName, getType, isAnnotationPresent, isAssignableFrom, isAssignableFrom, isDeclaredAnnotationPresent, isFinal, isProxyable, isPublic, isStatic |
ForwardingAnnotatedField
public ForwardingAnnotatedField()
delegate
protected abstract AnnotatedField<T> delegate()
- Description copied from class:
ForwardingAnnotatedItem
- Gets the annotated item
- Specified by:
delegate in class ForwardingAnnotatedMember<T,java.lang.reflect.Field>
- Returns:
- The annotated item
get
public T get(java.lang.Object instance)
- Specified by:
get in interface AnnotatedField<T>
getAnnotatedField
public java.lang.reflect.Field getAnnotatedField()
- Description copied from interface:
AnnotatedField
- Gets the annotated field
- Specified by:
getAnnotatedField in interface AnnotatedField<T>
- Returns:
- The annotated field
getDeclaringClass
public AnnotatedType<?> getDeclaringClass()
- Description copied from interface:
AnnotatedField
- Gets an abstraction of the declaring class
- Specified by:
getDeclaringClass in interface AnnotatedField<T>
- Returns:
- The declaring class
getPropertyName
public java.lang.String getPropertyName()
- Description copied from interface:
AnnotatedField
- Gets the property name of the field
- Specified by:
getPropertyName in interface AnnotatedField<T>
- Returns:
- The name
set
public void set(java.lang.Object declaringInstance,
java.lang.Object value)
throws java.lang.IllegalArgumentException,
java.lang.IllegalAccessException
- Description copied from interface:
AnnotatedField
- Injects an instance
- Specified by:
set in interface AnnotatedField<T>
- Parameters:
declaringInstance - The instance to inject intovalue - The value to inject
- Throws:
java.lang.IllegalArgumentException
java.lang.IllegalAccessException
setOnInstance
public void setOnInstance(java.lang.Object declaringInstance,
java.lang.Object value)
throws java.lang.IllegalArgumentException,
java.lang.SecurityException,
java.lang.IllegalAccessException,
java.lang.NoSuchFieldException
- Description copied from interface:
AnnotatedField
- Injects into the field using the value provided by the manager
Unlike
#set(Object, Manager) the field injected into is
discovered from the declaring instance. This is slower, but safe to use
with proxies.
- Specified by:
setOnInstance in interface AnnotatedField<T>
- Parameters:
declaringInstance - The instance to inject intovalue - The value to inject
- Throws:
java.lang.IllegalArgumentException
java.lang.SecurityException
java.lang.IllegalAccessException
java.lang.NoSuchFieldException
isTransient
public boolean isTransient()
- Specified by:
isTransient in interface AnnotatedField<T>
wrap
public AnnotatedField<T> wrap(java.util.Set<java.lang.annotation.Annotation> annotations)
Copyright © 2008-2009. All Rights Reserved.