Skip to content

io microsphere classloading ArtifactResourceResolver

github-actions[bot] edited this page Mar 21, 2026 · 1 revision

ArtifactResourceResolver

Type: Interface | Module: microsphere-java-core | Package: io.microsphere.classloading

Source: microsphere-java-core/src/main/java/io/microsphere/classloading/ArtifactResourceResolver.java

Overview

ArtifactResourceResolver interface is responsible for resolving resources related to an Artifact. Implementations of this interface are expected to handle the resolution of artifact resources from a given URL, such as archive files or directories.

Implementations should define how the specific resource (e.g., JAR file, exploded directory) should be interpreted and converted into an appropriate Artifact instance.

Example Usage

`public class MyArtifactResourceResolver implements ArtifactResourceResolver {
    public Artifact resolve(URL resourceURL) {
        // Implementation logic to convert the URL to an Artifact
        return new DefaultArtifact(resourceURL);
    `
}
}

Declaration

public interface ArtifactResourceResolver extends Prioritized

Author: Mercy

Version Information

  • Introduced in: 0.1.10-SNAPSHOT (current)
  • Current Project Version: 0.1.10-SNAPSHOT

Version Compatibility

This component is tested and compatible with the following Java versions:

Java Version Status
Java 8 ✅ Compatible
Java 11 ✅ Compatible
Java 17 ✅ Compatible
Java 21 ✅ Compatible
Java 25 ✅ Compatible

Examples

public class MyArtifactResourceResolver implements ArtifactResourceResolver {
    public Artifact resolve(URL resourceURL) {
        // Implementation logic to convert the URL to an Artifact
        return new DefaultArtifact(resourceURL);
    }
}

Usage

Maven Dependency

Add the following dependency to your pom.xml:

<dependency>
    <groupId>io.github.microsphere-projects</groupId>
    <artifactId>microsphere-java-core</artifactId>
    <version>${microsphere-java.version}</version>
</dependency>

Tip: Use the BOM (microsphere-java-dependencies) for consistent version management. See the Getting Started guide.

Import

import io.microsphere.classloading.ArtifactResourceResolver;

See Also

  • Artifact
  • Prioritized
  • StreamArtifactResourceResolver
  • ManifestArtifactResourceResolver
  • MavenArtifactResourceResolver

This documentation was auto-generated from the source code of microsphere-java.

Home

java-annotations

java-core

jdk-tools

lang-model

annotation-processor

java-test

Clone this wiki locally