pl.edu.agh.cast.util.reflect
Class AnnotationUtil
java.lang.Object
pl.edu.agh.cast.util.reflect.AnnotationUtil
public final class AnnotationUtil
- extends Object
An utility class for processing Java annotations.
- Author:
- AGH CAST Team
Method Summary |
static
|
getAnnotatedMethods(Class<?> clazz,
Class<T> annotation)
Returns a MultiMap of Method s of given class, which have at least one annotation of given type
through the inheritance hierarchy (including the ones from implemented interfaces). |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AnnotationUtil
public AnnotationUtil()
getAnnotatedMethods
public static <T extends Annotation> MultiMap<Method,T> getAnnotatedMethods(Class<?> clazz,
Class<T> annotation)
- Returns a
MultiMap
of Method
s of given class, which have at least one annotation of given type
through the inheritance hierarchy (including the ones from implemented interfaces).
- Type Parameters:
T
- type of annotation to look for- Parameters:
clazz
- the Class
whose methods should be analyzedannotation
- the annotation to look for
- Returns:
MultiMap
which contains only the methods with at least one annotation
present (the
key) and a list of corresponding annotations (the value)
Copyright © 2007-2009 IISG AGH-UST Krakow, Poland. All Rights Reserved.