Class ReflectionUtils
java.lang.Object
net.engio.mbassy.common.ReflectionUtils
- Author:
- bennidi Date: 2/16/12 Time: 12:14 PM
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidcollectInterfaces(Class from, Collection<Class> accumulator) static booleancontainsOverridingMethod(Method[] allMethods, Method methodToCheck) static <A extends Annotation>
AgetAnnotation(AnnotatedElement from, Class<A> annotationType) static Method[]getMethods(IPredicate<Method> condition, Class<?> target) static voidgetMethods(IPredicate<Method> condition, Class<?> target, ArrayList<Method> methods) static MethodgetOverridingMethod(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 existsstatic Class[]getSuperTypes(Class from) Collect all directly and indirectly related super types (classes and interfaces) of a given class.
-
Constructor Details
-
ReflectionUtils
public ReflectionUtils()
-
-
Method Details
-
getMethods
-
getMethods
public static void getMethods(IPredicate<Method> condition, Class<?> target, ArrayList<Method> methods) -
getOverridingMethod
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- Parameters:
overridingMethod-subclass-
-
getSuperTypes
-
collectInterfaces
-
containsOverridingMethod
-
getAnnotation
public static <A extends Annotation> A getAnnotation(AnnotatedElement from, Class<A> annotationType)
-