public class StandardJarScanner extends java.lang.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 |
addClassPath(java.util.Deque<java.net.URL> classPathUrlsToProcess) |
protected void |
doScanClassPath(JarScanType scanType,
ServletContext context,
JarScannerCallback callback,
java.util.Set<java.net.URL> processedURLs) |
JarScanFilter |
getJarScanFilter() |
boolean |
isScanAllDirectories() |
boolean |
isScanAllFiles() |
boolean |
isScanBootstrapClassPath() |
boolean |
isScanClassPath() |
boolean |
isScanManifest() |
protected void |
process(JarScanType scanType,
JarScannerCallback callback,
java.net.URL url,
java.lang.String webappPath,
boolean isWebapp,
java.util.Deque<java.net.URL> classPathUrlsToProcess) |
protected void |
processURLs(JarScanType scanType,
JarScannerCallback callback,
java.util.Set<java.net.URL> processedURLs,
boolean isWebapp,
java.util.Deque<java.net.URL> classPathUrlsToProcess) |
void |
scan(JarScanType scanType,
ServletContext context,
JarScannerCallback callback)
Scan the provided ServletContext and class loader for JAR files.
|
void |
setJarScanFilter(JarScanFilter jarScanFilter) |
void |
setScanAllDirectories(boolean scanAllDirectories) |
void |
setScanAllFiles(boolean scanAllFiles) |
void |
setScanBootstrapClassPath(boolean scanBootstrapClassPath) |
void |
setScanClassPath(boolean scanClassPath) |
void |
setScanManifest(boolean scanManifest) |
public boolean isScanClassPath()
public void setScanClassPath(boolean scanClassPath)
public boolean isScanManifest()
public void setScanManifest(boolean scanManifest)
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 JarScanFilter getJarScanFilter()
getJarScanFilter
in interface JarScanner
public void setJarScanFilter(JarScanFilter jarScanFilter)
setJarScanFilter
in interface JarScanner
public void scan(JarScanType scanType, ServletContext context, JarScannerCallback callback)
scan
in interface JarScanner
scanType
- The type of JAR scan to perform. This is passed to
the filter which uses it to determine how to
filter the resultscontext
- The ServletContext - used to locate and access
WEB-INF/libcallback
- The handler to process any JARs foundprotected void doScanClassPath(JarScanType scanType, ServletContext context, JarScannerCallback callback, java.util.Set<java.net.URL> processedURLs)
protected void processURLs(JarScanType scanType, JarScannerCallback callback, java.util.Set<java.net.URL> processedURLs, boolean isWebapp, java.util.Deque<java.net.URL> classPathUrlsToProcess)
protected void addClassPath(java.util.Deque<java.net.URL> classPathUrlsToProcess)
protected void process(JarScanType scanType, JarScannerCallback callback, java.net.URL url, java.lang.String webappPath, boolean isWebapp, java.util.Deque<java.net.URL> classPathUrlsToProcess) throws java.io.IOException
java.io.IOException
Copyright © 2000-2018 Apache Software Foundation. All Rights Reserved.