Package io.quarkus.paths
Class ArchivePathTree
java.lang.Object
io.quarkus.paths.PathTreeWithManifest
io.quarkus.paths.ArchivePathTree
- All Implemented Interfaces:
PathTree
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected classThread-safe view of an open archive backed by aReadOnlyZipFileSystem. -
Field Summary
FieldsFields inherited from class io.quarkus.paths.PathTreeWithManifest
JAVA_VERSION, manifestEnabled, manifestInitialized, multiReleaseMapping -
Method Summary
Modifier and TypeMethodDescriptionvoidConsumes a given resource from the tree.protected <T> TbooleanChecks whether the tree contains a resource.booleanReturns a set of resource names provided by this path tree.getRoots()The roots of the path tree.inthashCode()booleanWhether the content of this tree comes from an archive or not.open()Returns anOpenPathTreefor this tree, which is supposed to be closed at the end of processing.protected io.quarkus.fs.util.rozip.ReadOnlyZipFileSystemopenFs()toString()voidwalk(PathVisitor visitor) Walks the tree.voidwalkIfContains(String resourceDirName, PathVisitor visitor) Walks a subtree of resources in this tree that begins with a passed inresourceDirName.voidwalkRaw(PathVisitor visitor) Walks the tree without remapping multi release content to the paths expected for the current Java version.Methods inherited from class io.quarkus.paths.PathTreeWithManifest
apply, getManifestAttributes, getMultiReleaseMapping, initManifest, initMultiReleaseMapping, isMultiReleaseJar, manifestReadLock, manifestWriteLock, toMultiReleaseResourceName
-
Field Details
-
archive
-
-
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.
- Specified by:
isArchiveOriginin interfacePathTree
-
getRoots
Description copied from interface:PathTreeThe roots of the path tree.Note that you shouldn't use these roots for browsing except if the PathTree is open.
-
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. -
walkRaw
Description copied from interface:PathTreeWalks the tree without remapping multi release content to the paths expected for the current Java version. -
walkIfContains
Description copied from interface:PathTreeWalks a subtree of resources in this tree that begins with a passed inresourceDirName. If this tree does not contain resourceresourceDirNamethen the method returns without an error.This method does not create a new
PathTreewith the root atresourceDirName. It simply applies an inclusion filter to thisPathTreeinstance, keeping the same root.- Specified by:
walkIfContainsin interfacePathTree- Parameters:
resourceDirName- directory resource name starting from which the walk should beginvisitor- path visitor
-
getResourceNames
Description copied from interface:PathTreeReturns a set of resource names provided by this path tree. The set may include both directories and files.- Specified by:
getResourceNamesin interfacePathTree- Returns:
- a set of resource names provided by this path tree
-
apply
- Specified by:
applyin classPathTreeWithManifest
-
accept
Description copied from interface:PathTreeConsumes a given resource from the tree. If the resource isn't found in the tree, thePathVisitargument passed to the consumer will benull. -
contains
Description copied from interface:PathTreeChecks whether the tree contains a resource. -
openFs
- Throws:
IOException
-
open
Description copied from interface:PathTreeReturns anOpenPathTreefor 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:
openin interfacePathTree- Returns:
- an instance of
OpenPathTreefor this path tree
-
hashCode
public int hashCode() -
equals
-
toString
-