public interface AnnotationSource
Modifier and Type | Method and Description |
---|---|
boolean |
hasAnnotation(Class<? extends Annotation> annotationType)
Returns true if the property has the specified annotation.
|
<A extends Annotation> |
readAnnotation(Class<A> annotationType)
Gets the value of the specified annotation from the given property.
|
<A extends Annotation> A readAnnotation(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(Class<? extends Annotation> annotationType)
Short for readAnnotation(annotationType)!=null
,
but this method is typically faster.
Copyright © 2021 JBoss by Red Hat. All rights reserved.