public class PackageUtils extends Object
| Constructor and Description |
|---|
PackageUtils() |
| Modifier and Type | Method and Description |
|---|---|
static TreeSet<String> |
findClasses(String path,
String packageName,
Pattern regex)
Recursive method used to find all classes in a given directory and
subdirs.
|
static List<Class<?>> |
getClasses(String packageName,
String regexFilter)
Scans all classes accessible from the context class loader which belong
to the given package and subpackages.
|
public static List<Class<?>> getClasses(String packageName, String regexFilter) throws Exception
packageName - The base packageExceptionpublic static TreeSet<String> findClasses(String path, String packageName, Pattern regex) throws Exception
directory - The base directorypackageName - The package name for classes found inside the base directoryClassNotFoundExceptionMalformedURLExceptionExceptionCopyright © 2018. All rights reserved.