use of org.apache.tomcat.JarScanType in project tomee by apache.
the class TomEEJarScanner method doScan.
private void doScan(final JarScanType scanType, final JarScannerCallback callback, final Deque<URL> urls) {
Method process = null;
final boolean scanAllDirectories = isScanAllDirectories();
for (final URL url : urls) {
final File cpe = URLs.toFile(url);
if ((cpe.getName().endsWith(".jar") || scanType == JarScanType.PLUGGABILITY || scanAllDirectories) && getJarScanFilter().check(scanType, cpe.getName())) {
try {
if (process == null) {
process = StandardJarScanner.class.getDeclaredMethod("process", JarScanType.class, JarScannerCallback.class, URL.class, String.class, boolean.class, Deque.class);
if (!process.isAccessible()) {
process.setAccessible(true);
}
}
process.invoke(this, scanType, callback, url, null, true, urls);
} catch (final Exception ioe) {
// no-op
}
}
}
}
Aggregations