cz.cuni.amis.utils
Class ReflectionUtils

Package class diagram package ReflectionUtils
java.lang.Object
  extended by cz.cuni.amis.utils.ReflectionUtils

public class ReflectionUtils
extends Object

Utility methods for reading and processing annotations of objects and their members.

Author:
Martin Cerny

Nested Class Summary
static interface ReflectionUtils.ProcessAnnotatedFieldCallback<T extends Annotation,E extends Throwable>
           
static interface ReflectionUtils.ProcessAnnotatedMethodCallback<T extends Annotation>
           
static interface ReflectionUtils.ProcessFieldCallback<E extends Throwable>
           
 
Constructor Summary
ReflectionUtils()
           
 
Method Summary
static
<T extends Annotation,E extends Throwable>
void
processEachAnnotatedDeclaredField(Object targetObject, Class<T> annotationClass, ReflectionUtils.ProcessAnnotatedFieldCallback<T,E> callBack)
           
static
<T extends Annotation,E extends Throwable>
void
processEachAnnotatedDeclaredField(Object targetObject, Class rootClass, Class<T> annotationClass, ReflectionUtils.ProcessAnnotatedFieldCallback<T,E> callBack)
           
static
<T extends Annotation>
void
processEachAnnotatedDeclaredMethod(Object targetObject, Class<T> annotationClass, ReflectionUtils.ProcessAnnotatedMethodCallback<T> callBack)
           
static
<T extends Annotation>
void
processEachAnnotatedDeclaredMethod(Object targetObject, Class rootClass, Class<T> annotationClass, ReflectionUtils.ProcessAnnotatedMethodCallback<T> callBack)
           
static
<E extends Throwable>
void
processEachDeclaredFieldOfClass(Class targetClass, Class rootClass, ReflectionUtils.ProcessFieldCallback<E> callBack)
           
static
<E extends Throwable>
void
processEachDeclaredFieldOfClass(Class targetClass, ReflectionUtils.ProcessFieldCallback<E> callBack)
           
static
<E extends Throwable>
void
processEachDeclaredNonStaticField(Object targetObject, Class rootClass, ReflectionUtils.ProcessFieldCallback<E> callBack)
           
static
<E extends Throwable>
void
processEachDeclaredNonStaticField(Object targetObject, ReflectionUtils.ProcessFieldCallback<E> callBack)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReflectionUtils

public ReflectionUtils()
Method Detail

processEachDeclaredNonStaticField

public static <E extends Throwable> void processEachDeclaredNonStaticField(Object targetObject,
                                                                           ReflectionUtils.ProcessFieldCallback<E> callBack)
                                              throws E extends Throwable
Throws:
E extends Throwable

processEachDeclaredNonStaticField

public static <E extends Throwable> void processEachDeclaredNonStaticField(Object targetObject,
                                                                           Class rootClass,
                                                                           ReflectionUtils.ProcessFieldCallback<E> callBack)
                                              throws E extends Throwable
Throws:
E extends Throwable

processEachDeclaredFieldOfClass

public static <E extends Throwable> void processEachDeclaredFieldOfClass(Class targetClass,
                                                                         ReflectionUtils.ProcessFieldCallback<E> callBack)
                                            throws E extends Throwable
Throws:
E extends Throwable

processEachDeclaredFieldOfClass

public static <E extends Throwable> void processEachDeclaredFieldOfClass(Class targetClass,
                                                                         Class rootClass,
                                                                         ReflectionUtils.ProcessFieldCallback<E> callBack)
                                            throws E extends Throwable
Throws:
E extends Throwable

processEachAnnotatedDeclaredField

public static <T extends Annotation,E extends Throwable> void processEachAnnotatedDeclaredField(Object targetObject,
                                                                                                Class<T> annotationClass,
                                                                                                ReflectionUtils.ProcessAnnotatedFieldCallback<T,E> callBack)
                                              throws E extends Throwable
Throws:
E extends Throwable

processEachAnnotatedDeclaredField

public static <T extends Annotation,E extends Throwable> void processEachAnnotatedDeclaredField(Object targetObject,
                                                                                                Class rootClass,
                                                                                                Class<T> annotationClass,
                                                                                                ReflectionUtils.ProcessAnnotatedFieldCallback<T,E> callBack)
                                              throws E extends Throwable
Throws:
E extends Throwable

processEachAnnotatedDeclaredMethod

public static <T extends Annotation> void processEachAnnotatedDeclaredMethod(Object targetObject,
                                                                             Class<T> annotationClass,
                                                                             ReflectionUtils.ProcessAnnotatedMethodCallback<T> callBack)

processEachAnnotatedDeclaredMethod

public static <T extends Annotation> void processEachAnnotatedDeclaredMethod(Object targetObject,
                                                                             Class rootClass,
                                                                             Class<T> annotationClass,
                                                                             ReflectionUtils.ProcessAnnotatedMethodCallback<T> callBack)


Copyright © 2013 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.