public class ClassFinder extends Object
| Modifier and Type | Field and Description |
|---|---|
(package private) static org.slf4j.Logger |
log |
| Constructor and Description |
|---|
ClassFinder() |
| Modifier and Type | Method and Description |
|---|---|
private static List<Class<?>> |
findClasses(File directory,
String packageName)
Recursive method used to find all classes in a given directory and
subdirs.
|
static List<Class<?>> |
findClasses(JarFile jar,
String packageName) |
static List<Class<?>> |
getClasses(String packageName)
Scans all classes accessible from the context class loader which belong
to the given package and subpackages.
|
public static List<Class<?>> getClasses(String packageName) throws ClassNotFoundException, IOException
packageName - The base packageClassNotFoundExceptionIOExceptionpublic static List<Class<?>> findClasses(JarFile jar, String packageName) throws ClassNotFoundException
ClassNotFoundExceptionprivate static List<Class<?>> findClasses(File directory, String packageName) throws ClassNotFoundException
directory - The base directorypackageName - The package name for classes found inside the base directoryClassNotFoundExceptionCopyright © 2018. All rights reserved.