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:
Annotated
,AnnotatedField<X>
,AnnotatedMember<X>
,Serializable
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 boolean
equals(Object obj)
protected AnnotatedElement
getAnnotatedElement()
<T extends Annotation>
TgetAnnotation(Class<T> annotationType)
Get program element annotation of a certain annotation type.Field
getJavaMember()
Get the underlyingField
.int
hashCode()
boolean
isAnnotationPresent(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)
String
toString()
-
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 jakarta.enterprise.inject.spi.Annotated
getAnnotations, getBaseType, getTypeClosure
-
Methods inherited from interface jakarta.enterprise.inject.spi.AnnotatedField
getAnnotations
-
Methods inherited from interface jakarta.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:AnnotatedField
Get the underlying
Field
.- Specified by:
getJavaMember
in interfaceAnnotatedField<X>
- Specified by:
getJavaMember
in interfaceAnnotatedMember<X>
- Returns:
- the
Field
-
getAnnotation
public <T extends Annotation> T getAnnotation(Class<T> annotationType)
Description copied from interface:Annotated
Get 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:
getAnnotation
in 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:
getAnnotatedElement
in classBackedAnnotated
-
isAnnotationPresent
public boolean isAnnotationPresent(Class<? extends Annotation> annotationType)
Description copied from interface:Annotated
Determine 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:
isAnnotationPresent
in interfaceAnnotated
- Parameters:
annotationType
- the annotation type to check for- Returns:
true
if the program element has an annotation of the given annotation type, orfalse
otherwise
-
-