|
GWT 2.7.0 | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface HasAnnotations
Interface implemented by elements that can have annotations. This interface
is a departure for GWT in that it used types declared in the
java.lang.annotation package instead of types declared as part of this
typeinfo package. This reflects a compromise between a pure
TypeOracle
model and one that is more useful to developers.
Method Summary | ||
---|---|---|
|
getAnnotation(java.lang.Class<T> annotationClass)
Returns an instance of the specified annotation type if it is present on this element or null if it is not. |
|
java.lang.annotation.Annotation[] |
getAnnotations()
Returns all the annotations present on this element. |
|
java.lang.annotation.Annotation[] |
getDeclaredAnnotations()
Returns the annotations declared directly on this element; does not include any inherited annotations. |
|
boolean |
isAnnotationPresent(java.lang.Class<? extends java.lang.annotation.Annotation> annotationClass)
Returns true if this item has an annotation of the specified
type. |
Method Detail |
---|
<T extends java.lang.annotation.Annotation> T getAnnotation(java.lang.Class<T> annotationClass)
null
if it is not. For a class, this will
look for annotations on supertypes as well.
annotationClass
- annotation type to search for
null
if it is notjava.lang.annotation.Annotation[] getAnnotations()
java.lang.annotation.Annotation[] getDeclaredAnnotations()
boolean isAnnotationPresent(java.lang.Class<? extends java.lang.annotation.Annotation> annotationClass)
true
if this item has an annotation of the specified
type. For a class, this will look at supertypes as well.
true
if this item has an annotation of the specified
type
|
GWT 2.7.0 | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |