X
- the declaring typepublic interface AnnotatedField<X> extends AnnotatedMember<X>
Represents a field of a Java class.
Field
Modifier and Type | Method and Description |
---|---|
default <T extends java.lang.annotation.Annotation> |
getAnnotations(java.lang.Class<T> annotationType)
Get program element annotations of a certain annotation type.
|
java.lang.reflect.Field |
getJavaMember()
Get the underlying
Field . |
getDeclaringType, isStatic
getAnnotation, getAnnotations, getBaseType, getTypeClosure, isAnnotationPresent
java.lang.reflect.Field getJavaMember()
Get the underlying Field
.
getJavaMember
in interface AnnotatedMember<X>
Field
default <T extends java.lang.annotation.Annotation> java.util.Set<T> getAnnotations(java.lang.Class<T> annotationType)
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.
getAnnotations
in interface Annotated
T
- the type of the annotationannotationType
- the class of the annotation type