class ClassScanner extends Object
UserClassLoader
, attempts to match and fill in a Collection
of Class
, in various ways in which users may wish to do so.Modifier and Type | Field and Description |
---|---|
(package private) Collection<Class> |
classes |
(package private) ClassFilter |
classFilter |
(package private) UserClassLoader |
loader |
(package private) Logger |
logger |
Constructor and Description |
---|
ClassScanner(Logger logger,
Collection<Class> classes,
UserClassLoader loader) |
ClassScanner(Logger logger,
Collection<Class> classes,
UserClassLoader loader,
ClassFilter classFilter) |
Modifier and Type | Method and Description |
---|---|
void |
addClass(Class c) |
void |
addClass(String className) |
void |
addClassOrPackage(String name) |
void |
addMatchingDir(String parentName,
File dir,
String packagePath,
boolean recursive) |
void |
addMatchingFile(String filename,
String packagePath,
boolean recursive,
byte... data) |
void |
addPackage(String packageName,
boolean recursive) |
Collection<Class> |
getClasses() |
UserClassLoader |
getClassLoader() |
final Logger logger
final Collection<Class> classes
final UserClassLoader loader
final ClassFilter classFilter
ClassScanner(Logger logger, Collection<Class> classes, UserClassLoader loader)
ClassScanner(Logger logger, Collection<Class> classes, UserClassLoader loader, ClassFilter classFilter)
public Collection<Class> getClasses()
public UserClassLoader getClassLoader()
public void addClass(String className) throws ClassNotFoundException, NoClassDefFoundError
public void addClass(Class c)
public void addMatchingFile(String filename, String packagePath, boolean recursive, byte... data) throws ClassNotFoundException, NoClassDefFoundError
public void addMatchingDir(String parentName, File dir, String packagePath, boolean recursive) throws ClassNotFoundException, IOException, NoClassDefFoundError
public void addPackage(String packageName, boolean recursive) throws IOException, ClassNotFoundException, NoClassDefFoundError
public void addClassOrPackage(String name) throws IOException, ClassNotFoundException, NoClassDefFoundError
Copyright © 2020. All rights reserved.