public class ReflectionUtils extends Object
Constructor and Description |
---|
ReflectionUtils() |
Modifier and Type | Method and Description |
---|---|
static void |
collectInterfaces(Class from,
Collection<Class> accumulator) |
static boolean |
containsOverridingMethod(Method[] allMethods,
Method methodToCheck) |
static <A extends Annotation> |
getAnnotation(AnnotatedElement from,
Class<A> annotationType) |
static Method[] |
getMethods(IPredicate<Method> condition,
Class<?> target) |
static void |
getMethods(IPredicate<Method> condition,
Class<?> target,
ArrayList<Method> methods) |
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 Class[] |
getSuperTypes(Class from)
Collect all directly and indirectly related super types (classes and interfaces) of
a given class.
|
public static Method[] getMethods(IPredicate<Method> condition, Class<?> target)
public static void getMethods(IPredicate<Method> condition, Class<?> target, ArrayList<Method> methods)
public static Method getOverridingMethod(Method overridingMethod, Class subclass)
overridingMethod
- subclass
- public static Class[] getSuperTypes(Class from)
from
- The root class to start withpublic static void collectInterfaces(Class from, Collection<Class> accumulator)
public static boolean containsOverridingMethod(Method[] allMethods, Method methodToCheck)
public static <A extends Annotation> A getAnnotation(AnnotatedElement from, Class<A> annotationType)
Copyright © 2018. All rights reserved.