org.jboss.weld.introspector.jlr
Class WeldFieldImpl<T,X>
java.lang.Object
org.jboss.weld.introspector.jlr.AbstractWeldAnnotated<T,S>
org.jboss.weld.introspector.jlr.AbstractWeldMember<T,X,java.lang.reflect.Field>
org.jboss.weld.introspector.jlr.WeldFieldImpl<T,X>
- Type Parameters:
T -
- All Implemented Interfaces:
- javax.enterprise.inject.spi.Annotated, javax.enterprise.inject.spi.AnnotatedField<X>, javax.enterprise.inject.spi.AnnotatedMember<X>, WeldAnnotated<T,java.lang.reflect.Field>, WeldField<T,X>, WeldMember<T,X,java.lang.reflect.Field>
public class WeldFieldImpl<T,X>
- extends AbstractWeldMember<T,X,java.lang.reflect.Field>
- implements WeldField<T,X>
Represents an annotated field
This class is immutable, and therefore threadsafe
- Author:
- Pete Muir
|
Method Summary |
boolean |
equals(java.lang.Object other)
Compares two AbstractAnnotatedItems |
T |
get(java.lang.Object instance)
|
java.lang.reflect.Field |
getAnnotatedField()
Gets the underlying field |
java.lang.reflect.Field |
getDelegate()
|
java.lang.String |
getPropertyName()
Gets the property name |
int |
hashCode()
Gets the hash code of the actual type |
static
|
of(javax.enterprise.inject.spi.AnnotatedField<? super X> annotatedField,
WeldClass<X> declaringClass,
ClassTransformer classTransformer)
|
static
|
of(java.lang.reflect.Field field,
WeldClass<X> declaringClass,
ClassTransformer classTransformer)
|
void |
set(java.lang.Object instance,
java.lang.Object value)
Injects an instance |
void |
setOnInstance(java.lang.Object instance,
java.lang.Object value)
|
java.lang.String |
toString()
Gets a string representation of the field |
| Methods inherited from class org.jboss.weld.introspector.jlr.AbstractWeldAnnotated |
getActualTypeArguments, getAnnotation, getAnnotations, getAnnotationStore, getBaseType, getBindingsAsArray, getDeclaredMetaAnnotations, getInterfaceOnlyFlattenedTypeHierarchy, getJavaClass, getMetaAnnotations, getMetaAnnotationsAsArray, getQualifiers, getTypeClosure, isAnnotationPresent, isDeclaredAnnotationPresent, isParameterizedType, isProxyable |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.jboss.weld.introspector.WeldAnnotated |
getActualTypeArguments, getBindingsAsArray, getDeclaredMetaAnnotations, getInterfaceOnlyFlattenedTypeHierarchy, getJavaClass, getMetaAnnotations, getMetaAnnotationsAsArray, getName, getPackage, getQualifiers, isDeclaredAnnotationPresent, isFinal, isPackagePrivate, isParameterizedType, isPrivate, isProxyable, isPublic, isStatic |
| Methods inherited from interface javax.enterprise.inject.spi.AnnotatedField |
getJavaMember |
| Methods inherited from interface javax.enterprise.inject.spi.AnnotatedMember |
isStatic |
| Methods inherited from interface javax.enterprise.inject.spi.Annotated |
getAnnotation, getAnnotations, getBaseType, getTypeClosure, isAnnotationPresent |
of
public static <T,X> WeldFieldImpl<T,X> of(java.lang.reflect.Field field,
WeldClass<X> declaringClass,
ClassTransformer classTransformer)
of
public static <T,X> WeldFieldImpl<T,X> of(javax.enterprise.inject.spi.AnnotatedField<? super X> annotatedField,
WeldClass<X> declaringClass,
ClassTransformer classTransformer)
getAnnotatedField
public java.lang.reflect.Field getAnnotatedField()
- Gets the underlying field
- Returns:
- The fields
getDelegate
public java.lang.reflect.Field getDelegate()
- Specified by:
getDelegate in class AbstractWeldAnnotated<T,java.lang.reflect.Field>
set
public void set(java.lang.Object instance,
java.lang.Object value)
throws java.lang.IllegalArgumentException,
java.lang.IllegalAccessException
- Description copied from interface:
WeldField
- Injects an instance
- Specified by:
set in interface WeldField<T,X>
- Parameters:
instance - The instance to inject intovalue - The value to inject
- Throws:
java.lang.IllegalArgumentException
java.lang.IllegalAccessException
setOnInstance
public void setOnInstance(java.lang.Object instance,
java.lang.Object value)
throws java.lang.IllegalArgumentException,
java.lang.SecurityException,
java.lang.IllegalAccessException,
java.lang.NoSuchFieldException
- Throws:
java.lang.IllegalArgumentException
java.lang.SecurityException
java.lang.IllegalAccessException
java.lang.NoSuchFieldException
get
public T get(java.lang.Object instance)
- Specified by:
get in interface WeldField<T,X>
getPropertyName
public java.lang.String getPropertyName()
- Gets the property name
- Specified by:
getPropertyName in interface WeldField<T,X>
- Returns:
- The property name
- See Also:
WeldAnnotated.getName()
toString
public java.lang.String toString()
- Gets a string representation of the field
- Overrides:
toString in class AbstractWeldMember<T,X,java.lang.reflect.Field>
- Returns:
- A string representation
equals
public boolean equals(java.lang.Object other)
- Description copied from class:
AbstractWeldAnnotated
- Compares two AbstractAnnotatedItems
- Overrides:
equals in class AbstractWeldAnnotated<T,java.lang.reflect.Field>
- Parameters:
other - The other item
- Returns:
- True if equals, false otherwise
hashCode
public int hashCode()
- Description copied from class:
AbstractWeldAnnotated
- Gets the hash code of the actual type
- Overrides:
hashCode in class AbstractWeldAnnotated<T,java.lang.reflect.Field>
- Returns:
- The hash code
Copyright © 2008-2009 Seam Framework. All Rights Reserved.