Interface ClassPathElement
- All Superinterfaces:
AutoCloseable,Closeable
- All Known Implementing Classes:
AbstractClassPathElement,FilteredClassPathElement,MemoryClassPathElement,PathTreeClassPathElement
Represents an element on the virtual classpath, such as a jar file or classes
directory.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescription<T> TProcesses the content of this classpath element and returns a result.booleanWhether this class path element contains resources that can be reloaded in dev mode.static ClassPathElementfromDependency(io.quarkus.maven.dependency.ResolvedDependency dep) static ClassPathElementfromDependency(io.quarkus.paths.PathTree contentTree, io.quarkus.maven.dependency.ResolvedDependency dep) static ClassPathElementCreates an element from a file system pathdefault io.quarkus.maven.dependency.ArtifactKeyIf this classpath element represents a Maven artifact, the method will return its key, otherwise - null.io.quarkus.paths.ManifestAttributesReturns a set of all known resources.default io.quarkus.maven.dependency.ResolvedDependencyIf this classpath element represents a Maven artifact, the method will return it, otherwise - null.getResource(String name) Loads a resource from the class path element, or null if it does not exist.default List<ClassPathResource> getResources(String name) getRoot()booleanChecks whether this is a runtime classpath element
-
Field Details
-
EMPTY
-
-
Method Details
-
getDependencyKey
default io.quarkus.maven.dependency.ArtifactKey getDependencyKey()If 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
-
getResolvedDependency
default io.quarkus.maven.dependency.ResolvedDependency getResolvedDependency()If this classpath element represents a Maven artifact, the method will return it, otherwise - null.- Returns:
- the Maven artifact this classpath element represents or null, in case this element does not represent any Maven artifact
-
getRoot
Path getRoot()- Returns:
- The element root, or null if not applicable
-
apply
Processes the content of this classpath element and returns a result.- Type Parameters:
T- result type- Parameters:
func- content processing function- Returns:
- processing result
-
getResource
Loads 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
-
getProvidedResources
Returns a set of all known resources.- Returns:
- A set representing all known resources
-
containsReloadableResources
boolean containsReloadableResources()Whether this class path element contains resources that can be reloaded in dev mode. -
getProtectionDomain
ProtectionDomain getProtectionDomain()- Returns:
- The protection domain that should be used to define classes from this element
-
getManifestAttributes
io.quarkus.paths.ManifestAttributes getManifestAttributes() -
isRuntime
boolean isRuntime()Checks whether this is a runtime classpath element- Returns:
- true in case this is a runtime classpath element, otherwise - false
-
fromPath
Creates an element from a file system path -
fromDependency
-
fromDependency
static ClassPathElement fromDependency(io.quarkus.paths.PathTree contentTree, io.quarkus.maven.dependency.ResolvedDependency dep) -
getResources
-