org.jboss.lang
Class AnnotationHelper

java.lang.Object
  extended by org.jboss.lang.AnnotationHelper

public class AnnotationHelper
extends java.lang.Object

AnnotationHelper.


Method Summary
static java.lang.Object getAnnotation(java.lang.Class clazz, java.lang.Class annotationClass)
          Get an annotation
static java.lang.Object getAnnotation(java.lang.reflect.Constructor constructor, java.lang.Class annotationClass)
          Get an annotation
static java.lang.Object getAnnotation(java.lang.reflect.Field field, java.lang.Class annotationClass)
          Get an annotation
static java.lang.Object getAnnotation(java.lang.reflect.Method method, java.lang.Class annotationClass)
          Get an annotation
static java.lang.Object[] getAnnotations(java.lang.Class clazz)
          Get annotations
static java.lang.Object[] getAnnotations(java.lang.reflect.Constructor constructor)
          Get annotations
static java.lang.Object[] getAnnotations(java.lang.reflect.Field field)
          Get annotations
static java.lang.Object[] getAnnotations(java.lang.reflect.Method method)
          Get annotations
static java.lang.Object[][] getParameterAnnotations(java.lang.reflect.Constructor constructor)
          Get the parameter annotations
static java.lang.Object[][] getParameterAnnotations(java.lang.reflect.Method method)
          Get the parameter annotations
static boolean isAnnotationPresent(java.lang.Class clazz, java.lang.Class annotationClass)
          Whether an annotation is present
static boolean isAnnotationPresent(java.lang.reflect.Constructor constructor, java.lang.Class annotationClass)
          Whether an annotation is present
static boolean isAnnotationPresent(java.lang.reflect.Field field, java.lang.Class annotationClass)
          Whether an annotation is present
static boolean isAnnotationPresent(java.lang.reflect.Method method, java.lang.Class annotationClass)
          Whether an annotation is present
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

isAnnotationPresent

public static boolean isAnnotationPresent(java.lang.Class clazz,
                                          java.lang.Class annotationClass)
Whether an annotation is present

Parameters:
clazz - the class
annotationClass - the annotation class
Returns:
true when the annotation is present

getAnnotation

public static java.lang.Object getAnnotation(java.lang.Class clazz,
                                             java.lang.Class annotationClass)
Get an annotation

Parameters:
clazz - the class
annotationClass - the annotation class
Returns:
the annotation

getAnnotations

public static java.lang.Object[] getAnnotations(java.lang.Class clazz)
Get annotations

Parameters:
clazz - the class
Returns:
the annotations

isAnnotationPresent

public static boolean isAnnotationPresent(java.lang.reflect.Method method,
                                          java.lang.Class annotationClass)
Whether an annotation is present

Parameters:
method - the method
annotationClass - the annotation class
Returns:
true when the annotation is present

getAnnotation

public static java.lang.Object getAnnotation(java.lang.reflect.Method method,
                                             java.lang.Class annotationClass)
Get an annotation

Parameters:
method - the method
annotationClass - the annotation class
Returns:
the annotation

getAnnotations

public static java.lang.Object[] getAnnotations(java.lang.reflect.Method method)
Get annotations

Parameters:
method - the method
Returns:
the annotations

getParameterAnnotations

public static java.lang.Object[][] getParameterAnnotations(java.lang.reflect.Method method)
Get the parameter annotations

Parameters:
method - the method
Returns:
the annotations

isAnnotationPresent

public static boolean isAnnotationPresent(java.lang.reflect.Constructor constructor,
                                          java.lang.Class annotationClass)
Whether an annotation is present

Parameters:
constructor - the constructor
annotationClass - the annotation class
Returns:
true when the annotation is present

getAnnotation

public static java.lang.Object getAnnotation(java.lang.reflect.Constructor constructor,
                                             java.lang.Class annotationClass)
Get an annotation

Parameters:
constructor - the constructor
annotationClass - the annotation class
Returns:
the annotation

getAnnotations

public static java.lang.Object[] getAnnotations(java.lang.reflect.Constructor constructor)
Get annotations

Parameters:
constructor - the constructor
Returns:
the annotations

getParameterAnnotations

public static java.lang.Object[][] getParameterAnnotations(java.lang.reflect.Constructor constructor)
Get the parameter annotations

Parameters:
constructor - the constructor
Returns:
the annotations

isAnnotationPresent

public static boolean isAnnotationPresent(java.lang.reflect.Field field,
                                          java.lang.Class annotationClass)
Whether an annotation is present

Parameters:
field - the field
annotationClass - the annotation class
Returns:
true when the annotation is present

getAnnotation

public static java.lang.Object getAnnotation(java.lang.reflect.Field field,
                                             java.lang.Class annotationClass)
Get an annotation

Parameters:
field - the field
annotationClass - the annotation class
Returns:
the annotation

getAnnotations

public static java.lang.Object[] getAnnotations(java.lang.reflect.Field field)
Get annotations

Parameters:
field - the field
Returns:
the annotations