public class AnnotationHelper extends Object
Purpose:Provide a class which is responsible for returning Annotations from AnnotatedElements. This class can be extended in the case that the annotation data is being provided from an external source.
| Constructor and Description |
|---|
AnnotationHelper() |
| Modifier and Type | Method and Description |
|---|---|
Annotation |
getAnnotation(AnnotatedElement elem,
Class annotationClass)
Get an annotation of type annotationClass if it's present on the AnnotatedElement
elem.
|
Annotation[] |
getAnnotations(AnnotatedElement elem)
Get all annotations that exist on the AnnotatedElement elem
|
Annotation[] |
getDeclaredAnnotations(AnnotatedElement elem)
Get all annotations that are defined directly on the AnnotatedElement
(excluding inherited annotations).
|
boolean |
isAnnotationPresent(AnnotatedElement elem,
Class annotationClass)
Return true if the annotation annotationClass exists on the annotatedElement elem.
|
public Annotation getAnnotation(AnnotatedElement elem, Class annotationClass)
public Annotation[] getAnnotations(AnnotatedElement elem)
public boolean isAnnotationPresent(AnnotatedElement elem, Class annotationClass)
public Annotation[] getDeclaredAnnotations(AnnotatedElement elem)
Copyright © 2007–2021 Eclipse.org - EclipseLink Project. All rights reserved.