Package io.quarkus.paths
Class ArchivePathTree
- java.lang.Object
-
- io.quarkus.paths.PathTreeWithManifest
-
- io.quarkus.paths.ArchivePathTree
-
- All Implemented Interfaces:
PathTree
public class ArchivePathTree extends PathTreeWithManifest implements PathTree
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected class
ArchivePathTree.OpenArchivePathTree
-
Field Summary
Fields Modifier and Type Field Description protected Path
archive
-
Fields inherited from class io.quarkus.paths.PathTreeWithManifest
JAVA_VERSION, manifestEnabled, manifestInitialized, multiReleaseMapping
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
accept(String relativePath, Consumer<PathVisit> consumer)
Consumes a given path relative to the root of the tree.protected <T> T
apply(String relativePath, Function<PathVisit,T> func, boolean manifestEnabled)
boolean
contains(String relativePath)
Checks whether the tree contains a relative path.boolean
equals(Object obj)
Collection<Path>
getRoots()
The roots of the path tree.int
hashCode()
OpenPathTree
open()
Returns anOpenPathTree
for this tree, which is supposed to be closed at the end of processing.protected FileSystem
openFs()
void
walk(PathVisitor visitor)
Walks the tree.-
Methods inherited from class io.quarkus.paths.PathTreeWithManifest
apply, getManifest, getMultiReleaseMapping, initManifest, initMultiReleaseMapping, isMultiReleaseJar, manifestReadLock, manifestWriteLock, toMultiReleaseRelativePath
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.quarkus.paths.PathTree
apply, getManifest, isEmpty
-
-
-
-
Field Detail
-
archive
protected final Path archive
-
-
Method Detail
-
getRoots
public Collection<Path> getRoots()
Description copied from interface:PathTree
The roots of the path tree.
-
walk
public void walk(PathVisitor visitor)
Description copied from interface:PathTree
Walks the tree.
-
apply
protected <T> T apply(String relativePath, Function<PathVisit,T> func, boolean manifestEnabled)
- Specified by:
apply
in classPathTreeWithManifest
-
accept
public void accept(String relativePath, Consumer<PathVisit> consumer)
Description copied from interface:PathTree
Consumes a given path relative to the root of the tree. If the path isn't found in the tree, thePathVisit
argument passed to the consumer will benull
.
-
contains
public boolean contains(String relativePath)
Description copied from interface:PathTree
Checks whether the tree contains a relative path.
-
openFs
protected FileSystem openFs() throws IOException
- Throws:
IOException
-
open
public OpenPathTree open()
Description copied from interface:PathTree
Returns anOpenPathTree
for this tree, which is supposed to be closed at the end of processing. It is meant to be an optimization when processing multiple paths of path trees that represent archives. If a path tree does not represent an archive but a directory, for example, this method is expected to be a no-op, returning the original tree as an instance ofOpenPathTree
.- Specified by:
open
in interfacePathTree
- Returns:
- an instance of
OpenPathTree
for this path tree
-
-