public class Locator
extends java.lang.Object
Constructor and Description |
---|
Locator() |
Modifier and Type | Method and Description |
---|---|
static java.util.List<java.lang.Class<?>> |
findClasses(java.io.File directory,
java.lang.String packageName)
Recursive method used to find all classes in a given directory and subdirs.
|
static java.util.List<java.lang.Class<?>> |
getClasses(java.lang.String packageName)
Scans all classes accessible from the context class loader which belong to
the given package and subpackages.
|
public static java.util.List<java.lang.Class<?>> findClasses(java.io.File directory, java.lang.String packageName)
directory
- Directory to start searching inpackageName
- The package name for classes found inside the base directorypublic static java.util.List<java.lang.Class<?>> getClasses(java.lang.String packageName) throws java.io.IOException
packageName
- The package to scanjava.io.IOException
- if the path based on the packageName is not valid