@API(value=Maintained) public final class ReflectionSupport extends Object
| Modifier and Type | Method and Description |
|---|---|
static List<Class<?>> |
findAllClassesInClasspathRoot(URI root,
Predicate<Class<?>> classTester,
Predicate<String> classNameFilter)
|
static List<Class<?>> |
findAllClassesInPackage(String basePackageName,
Predicate<Class<?>> classTester,
Predicate<String> classNameFilter)
Find all classes of the supplied
basePackageName
that match the specified classTester and classNameFilter
predicates. |
static List<Method> |
findMethods(Class<?> clazz,
Predicate<Method> predicate,
HierarchyTraversalMode traversalMode)
Find all methods of the supplied class or interface
that match the specified
predicate. |
public static List<Class<?>> findAllClassesInClasspathRoot(URI root, Predicate<Class<?>> classTester, Predicate<String> classNameFilter)
root
URI that match the specified classTester and
classNameFilter predicates.root - the root URI to start scanningclassTester - the class type filter; never nullclassNameFilter - the class name filter; never nullnull nor mutablepublic static List<Class<?>> findAllClassesInPackage(String basePackageName, Predicate<Class<?>> classTester, Predicate<String> classNameFilter)
basePackageName
that match the specified classTester and classNameFilter
predicates.basePackageName - the base package name to start scanningclassTester - the class type filter; never nullclassNameFilter - the class name filter; never nullnull nor mutablepublic static List<Method> findMethods(Class<?> clazz, Predicate<Method> predicate, HierarchyTraversalMode traversalMode)
predicate.
If you're are looking for methods annotated with a certain annotation type, consider using AnnotationSupport.findAnnotatedMethods(Class, Class, HierarchyTraversalMode).
clazz - the class or interface in which to find the methods; never nullpredicate - the method filter; never nulltraversalMode - the hierarchy traversal mode; never nullnull nor mutable