| Modifier and Type | Field and Description |
|---|---|
| protected List | acceptedClassfileResources
The list of all classfiles found within this classpath element that were accepted and not rejected. |
| protected final List | acceptedResources
Resources found within this classpath element that were accepted and not rejected. |
| pack-priv Collection | childClasspathElements
The child classpath elements, keyed by the order of the child classpath element within the Class-Path entry of the manifest file the child classpath element was listed in (or the position of the file within the sorted entries of a lib directory). |
| protected ClassLoader | classLoader
The classloader that this classpath element was obtained from. |
| pack-priv int | classpathElementIdx
The index of the classpath element within the classpath or module path. |
| pack-priv final int | classpathElementIdxWithinParent
The index of the classpath element within the parent classpath element (e.g. for classpath elements added via a Class-Path entry in the manifest). |
| pack-priv boolean | containsSpecificallyAcceptedClasspathElementResourcePath
True if classpath element contains a specifically-accepted resource path. |
| protected final Map | fileToLastModified
The map from File to last modified timestamp, if scanFiles is true. |
| pack-priv String | moduleNameFromModuleDescriptor
The name of the module from the |
| pack-priv List | nestedClasspathRootPrefixes
If non-null, contains a list of resolved paths for any classpath element roots nested inside this classpath element. |
| protected String | packageRootPrefix
The package root within the jarfile or Path. |
| protected final AtomicBoolean | scanned
Flag to ensure classpath element is only scanned once. |
| protected ScanResult | scanResult
The ScanResult that the classpath element came from. |
| pack-priv final ScanSpec | scanSpec
The scan spec. |
| pack-priv boolean | skipClasspathElement
True if there was an exception when trying to open this classpath element (e.g. a corrupt ZipFile). |
| Access | Constructor and Description |
|---|---|
| pack-priv | ClasspathElement(final Scanner.
the work unit workUnit,the scan spec scanSpec)A classpath element. |
| Modifier and Type | Method and Description |
|---|---|
| protected void | addAcceptedResource(final Resource
the resource resource, final ScanSpec.the parent match status parentMatchStatus,if true, only add the resource to the list of classfile resources, not to the list of
non-classfile resources isClassfileOnly, final LogNode the log log)Add a resource discovered during the scan. |
| protected boolean | Returns: true if path should be scannedthe relative path relativePath, final LogNode the log log)Check relativePath against classpathElementResourcePathAcceptReject. |
| public int | compareTo(final ClasspathElement
the object to be compared. other)Implements java. Sort in increasing order of classpathElementIdxWithinParent. |
| protected void | |
| pack-priv abstract List | Returns: the URI for the classpath element.Get the URI for this classpath element, and the URIs for any automatic nested package prefixes (e.g. "spring-boot.jar/BOOT-INF/classes") within this jarfile. |
| pack-priv ClassLoader | Returns: the classloaderGet the ClassLoader the classpath element was obtained from. |
| pack-priv abstract File | Returns: the file for the classpath element.Get the file for this classpath element, or null if this is a module with a "jrt:" URI. |
| pack-priv abstract String | Returns: the module nameGet the name of this classpath element's module, or null if there is no module name. |
| pack-priv int | |
| pack-priv abstract Resource | Returns: TheResource for the given relative path, or null if relativePath does not exist in this
classpath element.The relative path of the relativePath)Resource to return. Path should have already be sanitized by
calling FileUtils#sanitizeEntryPath(String, boolean), or by providing a path that is
already sanitized (i.e. doesn't start or end with "/", doesn't contain "/../" or "/./", etc.).Get the |
| pack-priv abstract URI | |
| protected LogNode | |
| protected LogNode | |
| pack-priv void | maskClassfiles(final int
the classpath index classpathIdx, final Set<String> the classpath relative paths found classpathRelativePathsFound, final LogNode the log log)Apply relative path masking within this classpath resource -- remove relative paths that were found in an earlier classpath element. |
| pack-priv abstract void | open(final WorkQueue<Scanner.
the work queue workQueue,the log log)Determine if this classpath element is valid. |
| pack-priv abstract void | |
| pack-priv void |
| acceptedClassfileResources | back to summary |
|---|---|
| protected List<Resource> acceptedClassfileResources The list of all classfiles found within this classpath element that were accepted and not rejected. (Only written by one thread, so doesn't need to be a concurrent list.) | |
| acceptedResources | back to summary |
|---|---|
| protected final List<Resource> acceptedResources Resources found within this classpath element that were accepted and not rejected. (Only written by one thread, so doesn't need to be a concurrent list.) | |
| childClasspathElements | back to summary |
|---|---|
| pack-priv Collection<ClasspathElement> childClasspathElements The child classpath elements, keyed by the order of the child classpath element within the Class-Path entry of the manifest file the child classpath element was listed in (or the position of the file within the sorted entries of a lib directory). | |
| classLoader | back to summary |
|---|---|
| protected ClassLoader classLoader The classloader that this classpath element was obtained from. | |
| classpathElementIdx | back to summary |
|---|---|
| pack-priv int classpathElementIdx The index of the classpath element within the classpath or module path. | |
| classpathElementIdxWithinParent | back to summary |
|---|---|
| pack-priv final int classpathElementIdxWithinParent The index of the classpath element within the parent classpath element (e.g. for classpath elements added via a Class-Path entry in the manifest). Set to -1 initially in case the same ClasspathElement is present twice in the classpath, as a child of different parent ClasspathElements. | |
| containsSpecificallyAcceptedClasspathElementResourcePath | back to summary |
|---|---|
| pack-priv boolean containsSpecificallyAcceptedClasspathElementResourcePath True if classpath element contains a specifically-accepted resource path. | |
| fileToLastModified | back to summary |
|---|---|
| protected final Map<File, Long> fileToLastModified The map from File to last modified timestamp, if scanFiles is true. | |
| moduleNameFromModuleDescriptor | back to summary |
|---|---|
| pack-priv String moduleNameFromModuleDescriptor The name of the module from the | |
| nestedClasspathRootPrefixes | back to summary |
|---|---|
| pack-priv List<String> nestedClasspathRootPrefixes If non-null, contains a list of resolved paths for any classpath element roots nested inside this classpath element. (Scanning should stop at a nested classpath element root, otherwise that subtree will be scanned more than once.) N.B. contains only the nested part of the resolved path (the common prefix is removed). Also includes a trailing '/', since only nested directory classpath elements need to be caught (nested jars do not need to be caught, because we don't scan jars-within-jars unless the inner jar is explicitly listed on the classpath). | |
| packageRootPrefix | back to summary |
|---|---|
| protected String packageRootPrefix The package root within the jarfile or Path. | |
| scanned | back to summary |
|---|---|
| protected final AtomicBoolean scanned Flag to ensure classpath element is only scanned once. | |
| scanResult | back to summary |
|---|---|
| protected ScanResult scanResult The ScanResult that the classpath element came from. | |
| scanSpec | back to summary |
|---|---|
| pack-priv final ScanSpec scanSpec The scan spec. | |
| skipClasspathElement | back to summary |
|---|---|
| pack-priv boolean skipClasspathElement True if there was an exception when trying to open this classpath element (e.g. a corrupt ZipFile). | |
| ClasspathElement | back to summary |
|---|---|
| pack-priv ClasspathElement(final Scanner. A classpath element.
| |
| addAcceptedResource | back to summary |
|---|---|
| protected void addAcceptedResource(final Resource resource, final ScanSpec. Add a resource discovered during the scan.
| |
| checkResourcePathAcceptReject | back to summary |
|---|---|
| protected boolean checkResourcePathAcceptReject(final String relativePath, final LogNode log) Check relativePath against classpathElementResourcePathAcceptReject. | |
| compareTo | back to summary |
|---|---|
| public int compareTo(final ClasspathElement other) Implements java. Sort in increasing order of classpathElementIdxWithinParent.
| |
| finishScanPaths | back to summary |
|---|---|
| protected void finishScanPaths(final LogNode log) Called by scanPaths() after scan completion.
| |
| getAllURIs | back to summary |
|---|---|
| pack-priv abstract List Get the URI for this classpath element, and the URIs for any automatic nested package prefixes (e.g. "spring-boot.jar/BOOT-INF/classes") within this jarfile. | |
| getClassLoader | back to summary |
|---|---|
| pack-priv ClassLoader getClassLoader() Get the ClassLoader the classpath element was obtained from.
| |
| getFile | back to summary |
|---|---|
| pack-priv abstract File getFile() Get the file for this classpath element, or null if this is a module with a "jrt:" URI.
| |
| getModuleName | back to summary |
|---|---|
| pack-priv abstract String getModuleName() Get the name of this classpath element's module, or null if there is no module name.
| |
| getNumClassfileMatches | back to summary |
|---|---|
| pack-priv int getNumClassfileMatches() Get the number of classfile matches.
| |
| getResource | back to summary |
|---|---|
| pack-priv abstract Resource getResource(final String relativePath) Get the
| |
| getURI | back to summary |
|---|---|
| pack-priv abstract URI getURI() Get the URI for this classpath element.
| |
| log | back to summary |
|---|---|
| protected LogNode log(final int classpathElementIdx, final String msg, final LogNode log) Write entries to log in classpath / module path order. | |
| log | back to summary |
|---|---|
| protected LogNode log(final int classpathElementIdx, final String msg, final Throwable t, final LogNode log) Write entries to log in classpath / module path order. | |
| maskClassfiles | back to summary |
|---|---|
| pack-priv void maskClassfiles(final int classpathIdx, final Set<String> classpathRelativePathsFound, final LogNode log) Apply relative path masking within this classpath resource -- remove relative paths that were found in an earlier classpath element. | |
| open | back to summary |
|---|---|
| pack-priv abstract void open(final WorkQueue<Scanner. Determine if this classpath element is valid. If it is not valid, sets skipClasspathElement. For
| |
| scanPaths | back to summary |
|---|---|
| pack-priv abstract void scanPaths(final LogNode log) Scan paths in the classpath element for accept/reject criteria, creating Resource objects for accepted and non-rejected resources and classfiles.
| |
| setScanResult | back to summary |
|---|---|
| pack-priv void setScanResult(final ScanResult scanResult) Used to set the ScanResult after the scan is complete. | |