Package io.quarkus.paths
Class ArchivePathTree.OpenArchivePathTree
java.lang.Object
io.quarkus.paths.PathTreeWithManifest
io.quarkus.paths.OpenContainerPathTree
io.quarkus.paths.ArchivePathTree.OpenArchivePathTree
- All Implemented Interfaces:
OpenPathTree,PathTree,Closeable,AutoCloseable
- Enclosing class:
ArchivePathTree
-
Field Summary
Fields inherited from class io.quarkus.paths.OpenContainerPathTree
pathFilterFields inherited from class io.quarkus.paths.PathTreeWithManifest
JAVA_VERSION, manifestEnabled, manifestInitialized, multiReleaseMapping -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidConsumes a given path relative to the root of the tree.protected <T> Tvoidclose()booleanChecks whether the tree contains a relative path.protected PathThis is the path to the container.protected PathThis is the path to the container.protected voidprotected voidinitMultiReleaseMapping(Map<String, String> mrMapping) booleanWhether the content of this tree comes from an archive or not.booleanisOpen()protected ReentrantReadWriteLock.ReadLockreadLock()toString()voidwalk(PathVisitor visitor) Walks the tree.voidwalkIfContains(String relativePath, PathVisitor visitor) Walks a subtree of this tree that begins with a passed inrelativePath, if the tree containsrelativePath.voidwalkRaw(PathVisitor visitor) Walks the tree without remapping multi release content to the paths expected for the current Java version.protected ReentrantReadWriteLock.WriteLockMethods inherited from class io.quarkus.paths.OpenContainerPathTree
equals, getRoots, hashCode, openMethods inherited from class io.quarkus.paths.PathTreeWithManifest
apply, getManifestAttributes, getMultiReleaseMapping, isMultiReleaseJar, manifestReadLock, manifestWriteLock, toMultiReleaseRelativePath
-
Constructor Details
-
OpenArchivePathTree
-
-
Method Details
-
isArchiveOrigin
public boolean isArchiveOrigin()Description copied from interface:PathTreeWhether the content of this tree comes from an archive or not.This is useful for instance when you want to determine if the resources can be updated in dev mode.
-
getContainerPath
Description copied from class:OpenContainerPathTreeThis is the path to the container.In the case of a zip archive, it's the path of the archive. In the case of a directory, it's the directory.
Should only be used for equals/hashCode.
- Specified by:
getContainerPathin classOpenContainerPathTree
-
getRootPath
Description copied from class:OpenContainerPathTreeThis is the path to the container.In the case of a zip archive, it's the path to the root of the archive (i.e. a ZipPath). In the case of a directory, it's the directory.
Should be used for any read operation on the container.
- Specified by:
getRootPathin classOpenContainerPathTree
-
readLock
-
writeLock
-
initManifest
- Overrides:
initManifestin classPathTreeWithManifest
-
initMultiReleaseMapping
- Overrides:
initMultiReleaseMappingin classPathTreeWithManifest
-
isOpen
public boolean isOpen() -
apply
- Overrides:
applyin classOpenContainerPathTree
-
accept
Description copied from interface:PathTreeConsumes a given path relative to the root of the tree. If the path isn't found in the tree, thePathVisitargument passed to the consumer will benull.- Specified by:
acceptin interfacePathTree- Overrides:
acceptin classOpenContainerPathTree- Parameters:
relativePath- relative path to consumeconsumer- path consumer
-
walk
Description copied from interface:PathTreeWalks the tree. This method will make sure the relevant multi release content is associated with the expected resource name paths for the current Java version.- Specified by:
walkin interfacePathTree- Overrides:
walkin classOpenContainerPathTree- Parameters:
visitor- path visitor
-
walkRaw
Description copied from interface:PathTreeWalks the tree without remapping multi release content to the paths expected for the current Java version.- Specified by:
walkRawin interfacePathTree- Overrides:
walkRawin classOpenContainerPathTree- Parameters:
visitor- path visitor
-
walkIfContains
Description copied from interface:PathTreeWalks a subtree of this tree that begins with a passed inrelativePath, if the tree containsrelativePath. If the tree does not containrelativePaththen the method returns without an error.This method does not create a new
PathTreewith the root atrelativePath. It simply applies an inclusion filter to thisPathTreeinstance, keeping the same root.- Specified by:
walkIfContainsin interfacePathTree- Overrides:
walkIfContainsin classOpenContainerPathTree- Parameters:
relativePath- relative path from which the walk should beginvisitor- path visitor
-
contains
Description copied from interface:PathTreeChecks whether the tree contains a relative path.- Specified by:
containsin interfacePathTree- Overrides:
containsin classOpenContainerPathTree- Parameters:
relativePath- path relative to the root of the tree- Returns:
- true, in case the tree contains the path, otherwise - false
-
getPath
- Specified by:
getPathin interfaceOpenPathTree- Overrides:
getPathin classOpenContainerPathTree
-
close
- Throws:
IOException
-
getOriginalTree
-
toString
- Overrides:
toStringin classOpenContainerPathTree
-