Package io.microsphere.classloading
Class Artifact
- java.lang.Object
-
- io.microsphere.classloading.Artifact
-
- Direct Known Subclasses:
MavenArtifact
public class Artifact extends java.lang.Object
Artifact entity- Since:
- 1.0.0
- Author:
- Mercy
-
-
Constructor Summary
Constructors Constructor Description Artifact(java.lang.String artifactId, java.lang.String version, java.net.URL location)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Artifact
create(java.lang.String artifactId)
static Artifact
create(java.lang.String artifactId, java.lang.String version)
static Artifact
create(java.lang.String artifactId, java.lang.String version, java.net.URL location)
boolean
equals(java.lang.Object o)
java.lang.String
getArtifactId()
Get the artifact Idjava.net.URL
getLocation()
Get the location of artifact resourcejava.lang.String
getVersion()
Get the versionint
hashCode()
boolean
matches(Artifact artifact)
protected boolean
matches(Artifact artifact, java.util.function.Function<Artifact,java.lang.String> getterFunction)
protected boolean
matchesArtifactId(Artifact artifact)
protected boolean
matchesVersion(Artifact artifact)
java.lang.String
toString()
-
-
-
Field Detail
-
WILDCARD
public static final java.lang.String WILDCARD
- See Also:
- Constant Field Values
-
UNKNOWN
public static final java.lang.String UNKNOWN
- See Also:
- Constant Field Values
-
-
Method Detail
-
create
public static Artifact create(@Nonnull java.lang.String artifactId, @Nullable java.lang.String version, @Nullable java.net.URL location)
-
create
public static Artifact create(@Nonnull java.lang.String artifactId, @Nullable java.lang.String version)
-
getArtifactId
@Nonnull public java.lang.String getArtifactId()
Get the artifact Id- Returns:
- non-null
-
getVersion
@Nullable public java.lang.String getVersion()
Get the version- Returns:
- nullable
-
getLocation
@Nullable public java.net.URL getLocation()
Get the location of artifact resource- Returns:
- nullable
-
matches
public boolean matches(Artifact artifact)
-
matchesArtifactId
protected boolean matchesArtifactId(Artifact artifact)
-
matchesVersion
protected boolean matchesVersion(Artifact artifact)
-
matches
protected boolean matches(Artifact artifact, java.util.function.Function<Artifact,java.lang.String> getterFunction)
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-