public class StandardJarScanner extends Object implements JarScanner
JarScanner
implementation scans the WEB-INF/lib directory
followed by the provided classloader and then works up the classloader
hierarchy. This implementation is sufficient to meet the requirements of the
Servlet 3.0 specification as well as to provide a number of Tomcat specific
extensions. The extensions are:
Constructor and Description |
---|
StandardJarScanner() |
Modifier and Type | Method and Description |
---|---|
protected void |
doScanClassPath(ClassLoader classloader,
JarScannerCallback callback,
Set<String> ignoredJars) |
protected List<URL> |
getClassPath() |
boolean |
isScanAllDirectories() |
boolean |
isScanAllFiles() |
boolean |
isScanBootstrapClassPath() |
boolean |
isScanClassPath() |
protected void |
process(JarScannerCallback callback,
URL url) |
void |
scan(ServletContext context,
ClassLoader classloader,
JarScannerCallback callback,
Set<String> jarsToSkip)
Scan the provided ServletContext and classloader for JAR files.
|
void |
setScanAllDirectories(boolean scanAllDirectories) |
void |
setScanAllFiles(boolean scanAllFiles) |
void |
setScanBootstrapClassPath(boolean scanBootstrapClassPath) |
void |
setScanClassPath(boolean scanClassPath) |
public boolean isScanClassPath()
public void setScanClassPath(boolean scanClassPath)
public boolean isScanAllFiles()
public void setScanAllFiles(boolean scanAllFiles)
public boolean isScanAllDirectories()
public void setScanAllDirectories(boolean scanAllDirectories)
public boolean isScanBootstrapClassPath()
public void setScanBootstrapClassPath(boolean scanBootstrapClassPath)
public void scan(ServletContext context, ClassLoader classloader, JarScannerCallback callback, Set<String> jarsToSkip)
scan
in interface JarScanner
context
- The ServletContext - used to locate and access
WEB-INF/libclassloader
- The classloader - used to access JARs not in
WEB-INF/libcallback
- The handler to process any JARs foundjarsToSkip
- List of JARs to ignore. If this list is null, a
default list will be read from the system property
defined by Constants.SKIP_JARS_PROPERTY
protected void doScanClassPath(ClassLoader classloader, JarScannerCallback callback, Set<String> ignoredJars)
protected void process(JarScannerCallback callback, URL url) throws IOException
IOException
Copyright © 2000-2021 Apache Software Foundation. All Rights Reserved.