|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface AnnotationSource
Implemented by objects that can have annotations.
Method Summary | ||
---|---|---|
boolean |
hasAnnotation(Class<? extends Annotation> annotationType)
Returns true if the property has the specified annotation. |
|
|
readAnnotation(Class<A> annotationType)
Gets the value of the specified annotation from the given property. |
Method Detail |
---|
<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.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |