MCPcopy Index your code
hub / github.com/apache/tomcat / StandardJarScanner

Class StandardJarScanner

java/org/apache/tomcat/util/scan/StandardJarScanner.java:60–595  ·  view source on GitHub ↗

The default 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 specifi

Source from the content-addressed store, hash-verified

58 * All of the extensions may be controlled via configuration.
59 */
60public class StandardJarScanner implements JarScanner {
61
62 private final Log log = LogFactory.getLog(StandardJarScanner.class); // must not be static
63
64 /**
65 * Constructs a new StandardJarScanner instance.
66 */
67 public StandardJarScanner() {
68 }
69
70 /**
71 * The string resources for this package.
72 */
73 private static final StringManager sm = StringManager.getManager(Constants.Package);
74
75 private static final Set<ClassLoader> CLASSLOADER_HIERARCHY;
76
77 static {
78 Set<ClassLoader> cls = new HashSet<>();
79
80 ClassLoader cl = StandardJarScanner.class.getClassLoader();
81 while (cl != null) {
82 cls.add(cl);
83 cl = cl.getParent();
84 }
85
86 CLASSLOADER_HIERARCHY = Collections.unmodifiableSet(cls);
87 }
88
89 /**
90 * Controls the classpath scanning extension.
91 */
92 private boolean scanClassPath = true;
93
94 /**
95 * Returns whether classpath scanning is enabled.
96 *
97 * @return true if classpath scanning is enabled
98 */
99 public boolean isScanClassPath() {
100 return scanClassPath;
101 }
102
103 /**
104 * Sets whether classpath scanning is enabled.
105 *
106 * @param scanClassPath true to enable classpath scanning
107 */
108 public void setScanClassPath(boolean scanClassPath) {
109 this.scanClassPath = scanClassPath;
110 }
111
112 /**
113 * Controls the JAR file Manifest scanning extension.
114 */
115 private boolean scanManifest = true;
116
117 /**

Callers

nothing calls this directly

Calls 5

getLogMethod · 0.95
getManagerMethod · 0.95
getClassLoaderMethod · 0.65
addMethod · 0.65
getParentMethod · 0.65

Tested by

no test coverage detected