org.eclipse.persistence.jaxb.javamodel.reflection
Class AnnotationHelper

java.lang.Object
  extended by org.eclipse.persistence.jaxb.javamodel.reflection.AnnotationHelper

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.

Author:
mmacivor

Constructor Summary
AnnotationHelper()
           
 
Method Summary
 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
 boolean isAnnotationPresent(AnnotatedElement elem, Class annotationClass)
          Return true if the annotation annotationClass exists on the annotatedElement elem.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AnnotationHelper

public AnnotationHelper()
Method Detail

getAnnotation

public Annotation getAnnotation(AnnotatedElement elem,
                                Class annotationClass)
Get an annotation of type annotationClass if it's present on the AnnotatedElement elem.


getAnnotations

public Annotation[] getAnnotations(AnnotatedElement elem)
Get all annotations that exist on the AnnotatedElement elem


isAnnotationPresent

public boolean isAnnotationPresent(AnnotatedElement elem,
                                   Class annotationClass)
Return true if the annotation annotationClass exists on the annotatedElement elem.