Package javax.enterprise.inject.spi
Interface AnnotatedField<X>
- Type Parameters:
X
- the declaring type
- All Superinterfaces:
Annotated
,AnnotatedMember<X>
Represents a field of a Java class.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptiondefault <T extends Annotation>
Set<T>getAnnotations
(Class<T> annotationType) Get program element annotations of a certain annotation type.Get the underlyingField
.Methods inherited from interface javax.enterprise.inject.spi.Annotated
getAnnotation, getAnnotations, getBaseType, getTypeClosure, isAnnotationPresent
Methods inherited from interface javax.enterprise.inject.spi.AnnotatedMember
getDeclaringType, isStatic
-
Method Details
-
getJavaMember
Field getJavaMember()Get the underlying
Field
.- Specified by:
getJavaMember
in interfaceAnnotatedMember<X>
- Returns:
- the
Field
-
getAnnotations
Description copied from interface:Annotated
Get program element annotations of a certain annotation type.
This method returns back all annotations, including repeatable annotations of this type. The behavior of this method is intended to be the same behavior as
AnnotatedElement.getAnnotationsByType(Class)
, where repeatable annotations are supported.- Specified by:
getAnnotations
in interfaceAnnotated
- Type Parameters:
T
- the type of the annotation- Parameters:
annotationType
- the class of the annotation type- Returns:
- the program element annotations of the given annotation type, or an empty collection
-