Class BackedAnnotatedField<X>
- java.lang.Object
-
- org.jboss.weld.annotated.slim.BaseAnnotated
-
- org.jboss.weld.annotated.slim.backed.BackedAnnotated
-
- org.jboss.weld.annotated.slim.backed.BackedAnnotatedMember<X>
-
- org.jboss.weld.annotated.slim.backed.BackedAnnotatedField<X>
-
- All Implemented Interfaces:
Serializable,Annotated,AnnotatedField<X>,AnnotatedMember<X>
public class BackedAnnotatedField<X> extends BackedAnnotatedMember<X> implements AnnotatedField<X>, Serializable
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.jboss.weld.annotated.slim.backed.BackedAnnotatedMember
BackedAnnotatedMember.BackedAnnotatedMemberSerializationProxy<X,A extends AnnotatedMember<? super X>>
-
-
Constructor Summary
Constructors Constructor Description BackedAnnotatedField(Type baseType, Field field, BackedAnnotatedType<X> declaringType, SharedObjectCache sharedObjectCache)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)protected AnnotatedElementgetAnnotatedElement()<T extends Annotation>
TgetAnnotation(Class<T> annotationType)Get program element annotation of a certain annotation type.FieldgetJavaMember()Get the underlyingField.inthashCode()booleanisAnnotationPresent(Class<? extends Annotation> annotationType)Determine if the program element has an annotation of a certain annotation type.static <X,Y extends X>
AnnotatedField<X>of(Field field, BackedAnnotatedType<Y> declaringType, SharedObjectCache sharedObjectCache)StringtoString()-
Methods inherited from class org.jboss.weld.annotated.slim.backed.BackedAnnotatedMember
getDeclaringType, getReflectionCache, isStatic
-
Methods inherited from class org.jboss.weld.annotated.slim.backed.BackedAnnotated
getAnnotations, getTypeClosure, initTypeClosure
-
Methods inherited from class org.jboss.weld.annotated.slim.BaseAnnotated
getBaseType
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface javax.enterprise.inject.spi.Annotated
getAnnotations, getBaseType, getTypeClosure
-
Methods inherited from interface javax.enterprise.inject.spi.AnnotatedField
getAnnotations
-
Methods inherited from interface javax.enterprise.inject.spi.AnnotatedMember
getDeclaringType, isStatic
-
-
-
-
Constructor Detail
-
BackedAnnotatedField
public BackedAnnotatedField(Type baseType, Field field, BackedAnnotatedType<X> declaringType, SharedObjectCache sharedObjectCache)
-
-
Method Detail
-
of
public static <X,Y extends X> AnnotatedField<X> of(Field field, BackedAnnotatedType<Y> declaringType, SharedObjectCache sharedObjectCache)
-
getJavaMember
public Field getJavaMember()
Description copied from interface:AnnotatedFieldGet the underlying
Field.- Specified by:
getJavaMemberin interfaceAnnotatedField<X>- Specified by:
getJavaMemberin interfaceAnnotatedMember<X>- Returns:
- the
Field
-
getAnnotation
public <T extends Annotation> T getAnnotation(Class<T> annotationType)
Description copied from interface:AnnotatedGet program element annotation of a certain annotation type. The behavior of this method is intended to be the same behavior as
AnnotatedElement.getAnnotation(Class), where repeatable annotations are not supported.- Specified by:
getAnnotationin interfaceAnnotated- Type Parameters:
T- the type of the annotation- Parameters:
annotationType- the class of the annotation type- Returns:
- the first program element annotation of the given annotation type, or a null value
-
getAnnotatedElement
protected AnnotatedElement getAnnotatedElement()
- Specified by:
getAnnotatedElementin classBackedAnnotated
-
isAnnotationPresent
public boolean isAnnotationPresent(Class<? extends Annotation> annotationType)
Description copied from interface:AnnotatedDetermine if the program element has an annotation of a certain annotation type. The behavior of this method is similar to
AnnotatedElement.isAnnotationPresent(Class)for the underlying program element.- Specified by:
isAnnotationPresentin interfaceAnnotated- Parameters:
annotationType- the annotation type to check for- Returns:
- true if the program element has an annotation of the given annotation type, or false otherwise
-
-