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 intJAVA_VERSIONprotected booleanmanifestEnabledprotected booleanmanifestInitializedprotected Map<String,String>multiReleaseMapping
-
Constructor Summary
Constructors Modifier Constructor Description protectedPathTreeWithManifest()protectedPathTreeWithManifest(boolean manifestEnabled)protectedPathTreeWithManifest(PathTreeWithManifest pathTreeWithManifest)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description <T> Tapply(String relativePath, Function<PathVisit,T> func)Applies a function to a given path relative to the root of the tree.protected abstract <T> Tapply(String relativePath, Function<PathVisit,T> func, boolean manifestEnabled)ManifestgetManifest()IfMETA-INF/MANIFEST.MFfound, reads it and returns an instance ofManifest, otherwise returns null.protected Map<String,String>getMultiReleaseMapping()protected voidinitManifest(Manifest m)protected voidinitMultiReleaseMapping(Map<String,String> mrMapping)booleanisMultiReleaseJar()protected ReentrantReadWriteLock.ReadLockmanifestReadLock()protected ReentrantReadWriteLock.WriteLockmanifestWriteLock()protected StringtoMultiReleaseRelativePath(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:PathTreeApplies a function to a given path relative to the root of the tree. If the path isn't found in the tree, thePathVisitargument 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:PathTreeIfMETA-INF/MANIFEST.MFfound, reads it and returns an instance ofManifest, otherwise returns null.- Specified by:
getManifestin interfacePathTree- Returns:
- parsed
META-INF/MANIFEST.MFif it's found, otherwisenull
-
initManifest
protected void initManifest(Manifest m)
-
manifestWriteLock
protected ReentrantReadWriteLock.WriteLock manifestWriteLock()
-
manifestReadLock
protected ReentrantReadWriteLock.ReadLock manifestReadLock()
-
isMultiReleaseJar
public boolean isMultiReleaseJar()
-
-