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:
| Modifier and Type | Class and Description |
|---|---|
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private static final Set | |
| private JarScanFilter | jarScanFilter
Controls the filtering of the results from the scan for JARs |
| private final Log | |
| private boolean | scanAllDirectories
Controls the testing all directories to see of they are exploded JAR files extension. |
| private boolean | scanAllFiles
Controls the testing all files to see of they are JAR files extension. |
| private boolean | scanBootstrapClassPath
Controls the testing of the bootstrap classpath which consists of the runtime classes provided by the JVM and any installed system extensions. |
| private boolean | scanClassPath
Controls the classpath scanning extension. |
| private boolean | scanManifest
Controls the JAR file Manifest scanning extension. |
| private static final StringManager | sm
The string resources for this package. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected void | |
| protected void | doScanClassPath(JarScanType scanType, ServletContext context, JarScannerCallback callback, Set<URL> processedURLs)
|
| public JarScanFilter | |
| public boolean | |
| public boolean | |
| public boolean | |
| public boolean | |
| public boolean | |
| private static boolean | |
| protected void | process(JarScanType scanType, JarScannerCallback callback, URL url, String webappPath, boolean isWebapp, Deque<URL> classPathUrlsToProcess)
|
| private void | |
| protected void | processURLs(JarScanType scanType, JarScannerCallback callback, Set<URL> processedURLs, boolean isWebapp, Deque<URL> classPathUrlsToProcess)
|
| public void | scan(JarScanType
The type of JAR scan to perform. This is passed to
the filter which uses it to determine how to
filter the results scanType, ServletContext The ServletContext - used to locate and access
WEB-INF/lib context, JarScannerCallback The handler to process any JARs found callback)Implements org. Scan the provided ServletContext and class loader for JAR files. |
| public void | setJarScanFilter(JarScanFilter jarScanFilter)
Implements org.
|
| public void | |
| public void | |
| public void | |
| public void | |
| public void |
| CLASSLOADER_HIERARCHY | back to summary |
|---|---|
| private static final Set<ClassLoader> CLASSLOADER_HIERARCHY | |
| jarScanFilter | back to summary |
|---|---|
| private JarScanFilter jarScanFilter Controls the filtering of the results from the scan for JARs | |
| log | back to summary |
|---|---|
| private final Log log | |
| scanAllDirectories | back to summary |
|---|---|
| private boolean scanAllDirectories Controls the testing all directories to see of they are exploded JAR files extension. | |
| scanAllFiles | back to summary |
|---|---|
| private boolean scanAllFiles Controls the testing all files to see of they are JAR files extension. | |
| scanBootstrapClassPath | back to summary |
|---|---|
| private boolean scanBootstrapClassPath Controls the testing of the bootstrap classpath which consists of the runtime classes provided by the JVM and any installed system extensions. | |
| scanClassPath | back to summary |
|---|---|
| private boolean scanClassPath Controls the classpath scanning extension. | |
| scanManifest | back to summary |
|---|---|
| private boolean scanManifest Controls the JAR file Manifest scanning extension. | |
| sm | back to summary |
|---|---|
| private static final StringManager sm The string resources for this package. | |
| StandardJarScanner | back to summary |
|---|---|
| public StandardJarScanner() | |
| addClassPath | back to summary |
|---|---|
| protected void addClassPath(Deque<URL> classPathUrlsToProcess) | |
| doScanClassPath | back to summary |
|---|---|
| protected void doScanClassPath(JarScanType scanType, ServletContext context, JarScannerCallback callback, Set<URL> processedURLs) | |
| getJarScanFilter | back to summary |
|---|---|
| public JarScanFilter getJarScanFilter() Implements org.
| |
| isScanAllDirectories | back to summary |
|---|---|
| public boolean isScanAllDirectories() | |
| isScanAllFiles | back to summary |
|---|---|
| public boolean isScanAllFiles() | |
| isScanBootstrapClassPath | back to summary |
|---|---|
| public boolean isScanBootstrapClassPath() | |
| isScanClassPath | back to summary |
|---|---|
| public boolean isScanClassPath() | |
| isScanManifest | back to summary |
|---|---|
| public boolean isScanManifest() | |
| isWebappClassLoader | back to summary |
|---|---|
| private static boolean isWebappClassLoader(ClassLoader classLoader) | |
| process | back to summary |
|---|---|
| protected void process(JarScanType scanType, JarScannerCallback callback, URL url, String webappPath, boolean isWebapp, Deque<URL> classPathUrlsToProcess) throws IOException | |
| processManifest | back to summary |
|---|---|
| private void processManifest(Jar jar, boolean isWebapp, Deque<URL> classPathUrlsToProcess) throws IOException | |
| processURLs | back to summary |
|---|---|
| protected void processURLs(JarScanType scanType, JarScannerCallback callback, Set<URL> processedURLs, boolean isWebapp, Deque<URL> classPathUrlsToProcess) | |
| scan | back to summary |
|---|---|
| public void scan(JarScanType scanType, ServletContext context, JarScannerCallback callback) Implements org. Scan the provided ServletContext and class loader for JAR files. Each JAR file found will be passed to the callback handler to be processed.
| |
| setJarScanFilter | back to summary |
|---|---|
| public void setJarScanFilter(JarScanFilter jarScanFilter) Implements org.
| |
| setScanAllDirectories | back to summary |
|---|---|
| public void setScanAllDirectories(boolean scanAllDirectories) | |
| setScanAllFiles | back to summary |
|---|---|
| public void setScanAllFiles(boolean scanAllFiles) | |
| setScanBootstrapClassPath | back to summary |
|---|---|
| public void setScanBootstrapClassPath(boolean scanBootstrapClassPath) | |
| setScanClassPath | back to summary |
|---|---|
| public void setScanClassPath(boolean scanClassPath) | |
| setScanManifest | back to summary |
|---|---|
| public void setScanManifest(boolean scanManifest) | |
| Modifier and Type | Field and Description |
|---|---|
| private final boolean | |
| private final String |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public String | |
| public boolean |
| jar | back to summary |
|---|---|
| private final boolean jar | |
| name | back to summary |
|---|---|
| private final String name | |
| ClassPathEntry | back to summary |
|---|---|
| pack-priv ClassPathEntry(URL url) | |
| getName | back to summary |
|---|---|
| public String getName() | |
| isJar | back to summary |
|---|---|
| public boolean isJar() | |