pl.edu.agh.cast.util.reflect
Class AnnotationUtil

java.lang.Object
  extended by pl.edu.agh.cast.util.reflect.AnnotationUtil

public final class AnnotationUtil
extends Object

An utility class for processing Java annotations.

Author:
AGH CAST Team

Constructor Summary
AnnotationUtil()
           
 
Method Summary
static
<T extends Annotation>
MultiMap<Method,T>
getAnnotatedMethods(Class<?> clazz, Class<T> annotation)
          Returns a MultiMap of Methods 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
 

Constructor Detail

AnnotationUtil

public AnnotationUtil()
Method Detail

getAnnotatedMethods

public static <T extends Annotation> MultiMap<Method,T> getAnnotatedMethods(Class<?> clazz,
                                                                            Class<T> annotation)
Returns a MultiMap of Methods 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 analyzed
annotation - 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.