org.exoplatform.commons.reflect
Class AnnotationIntrospector

java.lang.Object
  extended by org.exoplatform.commons.reflect.AnnotationIntrospector

public class AnnotationIntrospector
extends java.lang.Object

Various utils for performing runtime introspection on annotations.

Version:
$Revision$
Author:
Julien Viet

Constructor Summary
AnnotationIntrospector()
           
 
Method Summary
static
<A extends java.lang.annotation.Annotation>
A
resolveClassAnnotations(java.lang.Class<?> clazz, java.lang.Class<A> classAnnotation)
          Resolve an annotation of the specified class and its inheritance hierarchy.
static
<A extends java.lang.annotation.Annotation>
java.util.Map<java.lang.reflect.Method,A>
resolveMethodAnnotations(java.lang.Class<?> clazz, java.lang.Class<A> methodAnnotation)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AnnotationIntrospector

public AnnotationIntrospector()
Method Detail

resolveClassAnnotations

public static <A extends java.lang.annotation.Annotation> A resolveClassAnnotations(java.lang.Class<?> clazz,
                                                                                    java.lang.Class<A> classAnnotation)
                                                                         throws java.lang.NullPointerException
Resolve an annotation of the specified class and its inheritance hierarchy. If no such annotation cannot be resolved then null is returned.

Type Parameters:
A - the annotation class
Parameters:
clazz - the examined class
classAnnotation - the annotation to lookup
Returns:
the annotation
Throws:
java.lang.NullPointerException - if any argument is null

resolveMethodAnnotations

public static <A extends java.lang.annotation.Annotation> java.util.Map<java.lang.reflect.Method,A> resolveMethodAnnotations(java.lang.Class<?> clazz,
                                                                                                                             java.lang.Class<A> methodAnnotation)


Copyright © 2010 eXo Platform SAS. All Rights Reserved.