public class ClasspathReader extends Reader
| Modifier and Type | Field and Description |
|---|---|
private List<String> |
classesToScan
The classes to scan.
|
private Filter |
filter
The filter.
|
private static org.slf4j.Logger |
logger |
| Constructor and Description |
|---|
ClasspathReader()
Instantiates a new classpath reader.
|
ClasspathReader(List<String> classesToScan)
Instantiates a new classpath reader.
|
| Modifier and Type | Method and Description |
|---|---|
URL[] |
findResources()
Find resources.
|
InputStream[] |
findResourcesAsStream()
Find resources.
|
URL[] |
findResourcesByClasspath()
Uses the java.class.path system property to obtain a list of URLs that
represent the CLASSPATH
|
private URL[] |
findResourcesByContextLoader()
Scan class resources into a basePackagetoScan path.
|
private URL[] |
findResourcesInUrls(String classRelativePath,
URL[] urls)
Scan class resource in the provided urls with the additional Class-Path
of each jar checking
|
Filter |
getFilter()
Gets the filter.
|
void |
read()
Read.
|
void |
setFilter(Filter filter)
Sets the filter.
|
accumulateAnnotations, addAnnotationDiscoveryListeners, addValidAnnotations, getAnnotationDiscoveryListeners, getResourceIterator, getValidAnnotations, scanClassprivate static org.slf4j.Logger logger
private Filter filter
public final void read()
Readerpublic final URL[] findResourcesByClasspath()
findResourcesByClasspath in class Readerprivate URL[] findResourcesInUrls(String classRelativePath, URL[] urls)
classRelativePath - relative path to a class resourceurls - urls to be checkedprivate final URL[] findResourcesByContextLoader()
public URL[] findResources()
ReaderfindResources in class Readerpublic final void setFilter(Filter filter)
filter - the new filterpublic InputStream[] findResourcesAsStream()
ReaderfindResourcesAsStream in class ReaderCopyright © 2015. All Rights Reserved.