public interface AnnotationSource
Modifier and Type | Method and Description |
---|---|
boolean |
hasAnnotation(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
Returns true if the property has the specified annotation.
|
<A extends java.lang.annotation.Annotation> |
readAnnotation(java.lang.Class<A> annotationType)
Gets the value of the specified annotation from the given property.
|
<A extends java.lang.annotation.Annotation> A readAnnotation(java.lang.Class<A> annotationType)
When this method is used for a property that consists of a getter and setter, it returns the annotation on either of those methods. If both methods have the same annotation, it is an error.
boolean hasAnnotation(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
Short for readAnnotation(annotationType)!=null
,
but this method is typically faster.