Class PathTreeClassPathElement
- java.lang.Object
-
- io.quarkus.bootstrap.classloading.AbstractClassPathElement
-
- io.quarkus.bootstrap.classloading.PathTreeClassPathElement
-
- All Implemented Interfaces:
ClassPathElement,Closeable,AutoCloseable
public class PathTreeClassPathElement extends AbstractClassPathElement
-
-
Field Summary
-
Fields inherited from interface io.quarkus.bootstrap.classloading.ClassPathElement
EMPTY
-
-
Constructor Summary
Constructors Constructor Description PathTreeClassPathElement(PathTree pathTree, boolean runtime)PathTreeClassPathElement(PathTree pathTree, boolean runtime, ArtifactKey dependencyKey)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> Tapply(Function<OpenPathTree,T> func)Processes the content of this classpath element and returns a result.voidclose()ArtifactKeygetDependencyKey()If this classpath element represents a Maven artifact, the method will return its key, otherwise - null.ProtectionDomaingetProtectionDomain(ClassLoader classLoader)Set<String>getProvidedResources()Returns a set of all known resources.ClassPathResourcegetResource(String name)Loads a resource from the class path element, or null if it does not exist.PathgetRoot()booleanisRuntime()Checks whether this is a runtime classpath elementprotected ManifestreadManifest()StringtoString()-
Methods inherited from class io.quarkus.bootstrap.classloading.AbstractClassPathElement
getManifest
-
-
-
-
Constructor Detail
-
PathTreeClassPathElement
public PathTreeClassPathElement(PathTree pathTree, boolean runtime)
-
PathTreeClassPathElement
public PathTreeClassPathElement(PathTree pathTree, boolean runtime, ArtifactKey dependencyKey)
-
-
Method Detail
-
isRuntime
public boolean isRuntime()
Description copied from interface:ClassPathElementChecks whether this is a runtime classpath element- Returns:
- true in case this is a runtime classpath element, otherwise - false
-
getDependencyKey
public ArtifactKey getDependencyKey()
Description copied from interface:ClassPathElementIf this classpath element represents a Maven artifact, the method will return its key, otherwise - null.- Returns:
- the key of the Maven artifact this classpath element represents or null, in case this element does not represent any Maven artifact
-
getRoot
public Path getRoot()
- Returns:
- The element root, or null if not applicable
-
getResource
public ClassPathResource getResource(String name)
Description copied from interface:ClassPathElementLoads a resource from the class path element, or null if it does not exist.- Parameters:
name- The resource to load- Returns:
- An representation of the class path resource if it exists
-
apply
public <T> T apply(Function<OpenPathTree,T> func)
Description copied from interface:ClassPathElementProcesses the content of this classpath element and returns a result.- Type Parameters:
T- result type- Parameters:
func- content processing function- Returns:
- processing result
-
getProvidedResources
public Set<String> getProvidedResources()
Description copied from interface:ClassPathElementReturns a set of all known resources.- Returns:
- A set representing all known resources
-
readManifest
protected Manifest readManifest()
- Overrides:
readManifestin classAbstractClassPathElement
-
getProtectionDomain
public ProtectionDomain getProtectionDomain(ClassLoader classLoader)
- Returns:
- The protection domain that should be used to define classes from this element
-
close
public void close() throws IOException- Throws:
IOException
-
-