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) |
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> |
getSuperTypes(Class from)
Collect all directly and indirectly related super types (classes and interfaces) of
a given class.
|
public static List<Method> getMethods(IPredicate<Method> condition, Class<?> target)
public static Method getOverridingMethod(Method overridingMethod, Class subclass)
overridingMethod - subclass - public static Set<Class> getSuperTypes(Class from)
from - The root class to start withpublic static boolean containsOverridingMethod(List<Method> allMethods, Method methodToCheck)
public static <A extends Annotation> A getAnnotation(AnnotatedElement from, Class<A> annotationType)
Copyright © 2015. All rights reserved.