Package io.github.classgraph.utils
Class VersionedZipEntry
- java.lang.Object
-
- io.github.classgraph.utils.VersionedZipEntry
-
- All Implemented Interfaces:
Comparable<VersionedZipEntry>
public class VersionedZipEntry extends Object implements Comparable<VersionedZipEntry>
-
-
Field Summary
Fields Modifier and Type Field Description String
unversionedPath
The ZipEntry path with any "META-INF/versions/{version}" version prefix (and/or Spring-Boot "BOOT-INF/classes/" prefix) stripped.int
version
The version code (>= 9), or 8 for the base layer or a non-versioned jar (whether JDK 7 or 8 compatible).ZipEntry
zipEntry
TheZipEntry
.
-
Constructor Summary
Constructors Constructor Description VersionedZipEntry(ZipEntry zipEntry, int version, String unversionedPath)
A versionedZipEntry
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(VersionedZipEntry o)
Sort in decreasing order of version number, then in increasing lexicographic order of path
-
-
-
Field Detail
-
version
public final int version
The version code (>= 9), or 8 for the base layer or a non-versioned jar (whether JDK 7 or 8 compatible).
-
unversionedPath
public final String unversionedPath
The ZipEntry path with any "META-INF/versions/{version}" version prefix (and/or Spring-Boot "BOOT-INF/classes/" prefix) stripped.
-
-
Constructor Detail
-
VersionedZipEntry
public VersionedZipEntry(ZipEntry zipEntry, int version, String unversionedPath)
A versionedZipEntry
.- Parameters:
zipEntry
- TheZipEntry
.version
- The multi-release jar version number (for aZipEntry
path of "META-INF/versions/{version}", or 8 for the base layer.unversionedPath
- The unversioned path (i.e.ZipEntry.getName()
with the version path prefix stripped).
-
-
Method Detail
-
compareTo
public int compareTo(VersionedZipEntry o)
Sort in decreasing order of version number, then in increasing lexicographic order of path- Specified by:
compareTo
in interfaceComparable<VersionedZipEntry>
-
-