@Named public class ClasspathScannerImpl extends AbstractLoggableComponent implements ClasspathScanner
ClasspathScanner.| Modifier and Type | Class and Description |
|---|---|
protected static class |
ClasspathScannerImpl.AbstractBrowsableClasspathResource
Abstract base implementation of
BrowsableResource for ClasspathScannerImpl.ClasspathFile or ClasspathScannerImpl.ClasspathFolder. |
protected static class |
ClasspathScannerImpl.Cache
Container with all cached data.
|
protected static class |
ClasspathScannerImpl.ClasspathFile
A file on the classpath.
|
protected static class |
ClasspathScannerImpl.ClasspathFolder
A folder (package) of the classpath.
|
| Modifier and Type | Field and Description |
|---|---|
private ClasspathScannerImpl.Cache |
cache |
private ReflectionUtil |
reflectionUtil |
| Constructor and Description |
|---|
ClasspathScannerImpl()
The constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clearCaches()
Evicts all cache data so that any further invocation of the other methods will rebuild the cached data
from scratch.
|
private ClasspathScannerImpl.ClasspathFolder |
createFolderRecursive(ResourcePathNode<Void> path,
ClasspathScannerImpl.ClasspathFolder rootFolder) |
protected ClasspathScannerImpl.Cache |
getCache() |
ClasspathScannerImpl.ClasspathFolder |
getClasspathResource() |
BrowsableResource |
getClasspathResource(Package pkg) |
BrowsableResource |
getClasspathResource(String classpath) |
Iterable<? extends BrowsableResource> |
getClasspathResourceFiles() |
Iterable<? extends BrowsableResource> |
getClasspathResourceFiles(Filter<? super BrowsableResource> filter) |
ReflectionUtil |
getReflectionUtil() |
private void |
initCache()
Scans the entire classpath and initializes the
root. |
void |
setReflectionUtil(ReflectionUtil reflectionUtil) |
createLogger, doInitialize, getLoggerdoInitialized, getInitializationState, initializeprivate ReflectionUtil reflectionUtil
getReflectionUtil()private ClasspathScannerImpl.Cache cache
getCache()protected final ClasspathScannerImpl.Cache getCache()
ClasspathScannerImpl.Cache. Will be created lazily.private void initCache()
root.public void clearCaches()
clearCaches in interface ClasspathScannerprivate ClasspathScannerImpl.ClasspathFolder createFolderRecursive(ResourcePathNode<Void> path, ClasspathScannerImpl.ClasspathFolder rootFolder)
path - the path to create.rootFolder - the root folder.public ClasspathScannerImpl.ClasspathFolder getClasspathResource()
getClasspathResource in interface ClasspathScannerBrowsableResource for the root (or default) package.public BrowsableResource getClasspathResource(String classpath)
getClasspathResource in interface ClasspathScannerclasspath - is the classpath location pointing to a Package or
ClasspathResource.BrowsableResource for the given classpath.public BrowsableResource getClasspathResource(Package pkg)
getClasspathResource in interface ClasspathScannerpkg - is the Package to get.BrowsableResource pointing to the given package.public Iterable<? extends BrowsableResource> getClasspathResourceFiles()
getClasspathResourceFiles in interface ClasspathScannerIterable with ALL existing file resources on the
classpath.public Iterable<? extends BrowsableResource> getClasspathResourceFiles(Filter<? super BrowsableResource> filter)
getClasspathResourceFiles in interface ClasspathScannerfilter - decides which file resources to
accept. Please note that the name of the filtered resources will end with ".class" in case of a Class.Iterable with all resource files on the classpath
accepted by the given filter.public ReflectionUtil getReflectionUtil()
ReflectionUtil to use.@Inject public void setReflectionUtil(ReflectionUtil reflectionUtil)
reflectionUtil - is the ReflectionUtil to Inject.Copyright © 2001–2015 mmm-Team. All rights reserved.