Package io.quarkus.paths
Class PathTreeWithManifest
- java.lang.Object
-
- io.quarkus.paths.PathTreeWithManifest
-
- All Implemented Interfaces:
PathTree
- Direct Known Subclasses:
ArchivePathTree
,DirectoryPathTree
public abstract class PathTreeWithManifest extends Object implements PathTree
-
-
Field Summary
Fields Modifier and Type Field Description static int
JAVA_VERSION
protected boolean
manifestEnabled
protected boolean
manifestInitialized
protected Map<String,String>
multiReleaseMapping
-
Constructor Summary
Constructors Modifier Constructor Description protected
PathTreeWithManifest()
protected
PathTreeWithManifest(boolean manifestEnabled)
protected
PathTreeWithManifest(PathTreeWithManifest pathTreeWithManifest)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description <T> T
apply(String relativePath, Function<PathVisit,T> func)
Applies a function to a given path relative to the root of the tree.protected abstract <T> T
apply(String relativePath, Function<PathVisit,T> func, boolean manifestEnabled)
Manifest
getManifest()
IfMETA-INF/MANIFEST.MF
found, reads it and returns an instance ofManifest
, otherwise returns null.protected Map<String,String>
getMultiReleaseMapping()
protected void
initManifest(Manifest m)
protected void
initMultiReleaseMapping(Map<String,String> mrMapping)
boolean
isMultiReleaseJar()
protected ReentrantReadWriteLock.ReadLock
manifestReadLock()
protected ReentrantReadWriteLock.WriteLock
manifestWriteLock()
protected String
toMultiReleaseRelativePath(String relativePath)
-
-
-
Constructor Detail
-
PathTreeWithManifest
protected PathTreeWithManifest()
-
PathTreeWithManifest
protected PathTreeWithManifest(boolean manifestEnabled)
-
PathTreeWithManifest
protected PathTreeWithManifest(PathTreeWithManifest pathTreeWithManifest)
-
-
Method Detail
-
apply
public <T> T apply(String relativePath, Function<PathVisit,T> func)
Description copied from interface:PathTree
Applies a function to a given path relative to the root of the tree. If the path isn't found in the tree, thePathVisit
argument passed to the function will benull
.
-
apply
protected abstract <T> T apply(String relativePath, Function<PathVisit,T> func, boolean manifestEnabled)
-
getManifest
public Manifest getManifest()
Description copied from interface:PathTree
IfMETA-INF/MANIFEST.MF
found, reads it and returns an instance ofManifest
, otherwise returns null.- Specified by:
getManifest
in interfacePathTree
- Returns:
- parsed
META-INF/MANIFEST.MF
if it's found, otherwisenull
-
initManifest
protected void initManifest(Manifest m)
-
manifestWriteLock
protected ReentrantReadWriteLock.WriteLock manifestWriteLock()
-
manifestReadLock
protected ReentrantReadWriteLock.ReadLock manifestReadLock()
-
isMultiReleaseJar
public boolean isMultiReleaseJar()
-
-