org.exoplatform.commons.reflect
Class AnnotationIntrospector
java.lang.Object
org.exoplatform.commons.reflect.AnnotationIntrospector
public class AnnotationIntrospector
- extends Object
Various utils for performing runtime introspection on annotations.
- Version:
- $Revision$
- Author:
- Julien Viet
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AnnotationIntrospector
public AnnotationIntrospector()
resolveClassAnnotations
public static <A extends Annotation> A resolveClassAnnotations(Class<?> clazz,
Class<A> classAnnotation)
throws 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 classclassAnnotation - the annotation to lookup
- Returns:
- the annotation
- Throws:
NullPointerException - if any argument is null
resolveMethodAnnotations
public static <A extends Annotation> Map<Method,A> resolveMethodAnnotations(Class<?> clazz,
Class<A> methodAnnotation)
Copyright © 2009 eXo Platform SAS. All Rights Reserved.