public class ReflectionUtils extends Object
| Constructor and Description |
|---|
ReflectionUtils() |
| Modifier and Type | Method and Description |
|---|---|
static void |
collectInterfaces(Class from,
Set<Class> accumulator) |
static boolean |
containsOverridingMethod(List<Method> allMethods,
Method methodToCheck) |
static <A extends Annotation> |
getAnnotation(AnnotatedElement from,
Class<A> annotationType)
Searches for an Annotation of the given type on the class.
|
static <A extends Annotation> |
getAnnotation(Class from,
Class<A> annotationType) |
static <A extends Annotation> |
getAnnotation(Method method,
Class<A> annotationType) |
static List<Method> |
getMethods(IPredicate<Method> condition,
Class<?> target) |
static Method |
getOverridingMethod(Method overridingMethod,
Class subclass)
Traverses the class hierarchy upwards, starting at the given subclass, looking
for an override of the given methods -> finds the bottom most override of the given
method if any exists
|
static Set<Class> |
getSuperclasses(Class from) |
public static List<Method> getMethods(IPredicate<Method> condition, Class<?> target)
public static Method getOverridingMethod(Method overridingMethod, Class subclass)
overridingMethod - subclass - public static boolean containsOverridingMethod(List<Method> allMethods, Method methodToCheck)
public static <A extends Annotation> A getAnnotation(Method method, Class<A> annotationType)
public static <A extends Annotation> A getAnnotation(Class from, Class<A> annotationType)
public static <A extends Annotation> A getAnnotation(AnnotatedElement from, Class<A> annotationType)
A - Annotation classfrom - AnnotatedElement (class, method...)annotationType - Annotation class to look for.Copyright © 2014. All rights reserved.