Package org.apache.tomcat.util.scan
Class StandardJarScanner
- java.lang.Object
- 
- org.apache.tomcat.util.scan.StandardJarScanner
 
- 
- All Implemented Interfaces:
- JarScanner
 
 public class StandardJarScanner extends java.lang.Object implements JarScanner The defaultJarScannerimplementation 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:- Scanning the classloader hierarchy (enabled by default)
- Testing all files to see if they are JARs (disabled by default)
- Testing all directories to see if they are exploded JARs (disabled by default)
 
- 
- 
Constructor SummaryConstructors Constructor Description StandardJarScanner()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddClassPath(java.util.Deque<java.net.URL> classPathUrlsToProcess)protected voiddoScanClassPath(JarScanType scanType, ServletContext context, JarScannerCallback callback, java.util.Set<java.net.URL> processedURLs)JarScanFiltergetJarScanFilter()booleanisScanAllDirectories()booleanisScanAllFiles()booleanisScanBootstrapClassPath()booleanisScanClassPath()booleanisScanManifest()protected voidprocess(JarScanType scanType, JarScannerCallback callback, java.net.URL url, java.lang.String webappPath, boolean isWebapp, java.util.Deque<java.net.URL> classPathUrlsToProcess)protected voidprocessURLs(JarScanType scanType, JarScannerCallback callback, java.util.Set<java.net.URL> processedURLs, boolean isWebapp, java.util.Deque<java.net.URL> classPathUrlsToProcess)voidscan(JarScanType scanType, ServletContext context, JarScannerCallback callback)Scan the provided ServletContext and class loader for JAR files.voidsetJarScanFilter(JarScanFilter jarScanFilter)voidsetScanAllDirectories(boolean scanAllDirectories)voidsetScanAllFiles(boolean scanAllFiles)voidsetScanBootstrapClassPath(boolean scanBootstrapClassPath)voidsetScanClassPath(boolean scanClassPath)voidsetScanManifest(boolean scanManifest)
 
- 
- 
- 
Method Detail- 
isScanClassPathpublic boolean isScanClassPath() 
 - 
setScanClassPathpublic void setScanClassPath(boolean scanClassPath) 
 - 
isScanManifestpublic boolean isScanManifest() 
 - 
setScanManifestpublic void setScanManifest(boolean scanManifest) 
 - 
isScanAllFilespublic boolean isScanAllFiles() 
 - 
setScanAllFilespublic void setScanAllFiles(boolean scanAllFiles) 
 - 
isScanAllDirectoriespublic boolean isScanAllDirectories() 
 - 
setScanAllDirectoriespublic void setScanAllDirectories(boolean scanAllDirectories) 
 - 
isScanBootstrapClassPathpublic boolean isScanBootstrapClassPath() 
 - 
setScanBootstrapClassPathpublic void setScanBootstrapClassPath(boolean scanBootstrapClassPath) 
 - 
getJarScanFilterpublic JarScanFilter getJarScanFilter() - Specified by:
- getJarScanFilterin interface- JarScanner
 
 - 
setJarScanFilterpublic void setJarScanFilter(JarScanFilter jarScanFilter) - Specified by:
- setJarScanFilterin interface- JarScanner
 
 - 
scanpublic void scan(JarScanType scanType, ServletContext context, JarScannerCallback callback) Scan the provided ServletContext and class loader for JAR files. Each JAR file found will be passed to the callback handler to be processed.- Specified by:
- scanin interface- JarScanner
- Parameters:
- scanType- The type of JAR scan to perform. This is passed to the filter which uses it to determine how to filter the results
- context- The ServletContext - used to locate and access WEB-INF/lib
- callback- The handler to process any JARs found
 
 - 
doScanClassPathprotected void doScanClassPath(JarScanType scanType, ServletContext context, JarScannerCallback callback, java.util.Set<java.net.URL> processedURLs) 
 - 
processURLsprotected void processURLs(JarScanType scanType, JarScannerCallback callback, java.util.Set<java.net.URL> processedURLs, boolean isWebapp, java.util.Deque<java.net.URL> classPathUrlsToProcess) 
 - 
addClassPathprotected void addClassPath(java.util.Deque<java.net.URL> classPathUrlsToProcess) 
 - 
processprotected 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 - Throws:
- java.io.IOException
 
 
- 
 
-