Package io.microsphere.classloading
Class Artifact
- java.lang.Object
-
- io.microsphere.classloading.Artifact
-
- Direct Known Subclasses:
MavenArtifact
public class Artifact extends java.lang.ObjectArtifact 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 Artifactcreate(java.lang.String artifactId)static Artifactcreate(java.lang.String artifactId, java.lang.String version)static Artifactcreate(java.lang.String artifactId, java.lang.String version, java.net.URL location)booleanequals(java.lang.Object o)java.lang.StringgetArtifactId()Get the artifact Idjava.net.URLgetLocation()Get the location of artifact resourcejava.lang.StringgetVersion()Get the versioninthashCode()booleanmatches(Artifact artifact)protected booleanmatches(Artifact artifact, java.util.function.Function<Artifact,java.lang.String> getterFunction)protected booleanmatchesArtifactId(Artifact artifact)protected booleanmatchesVersion(Artifact artifact)java.lang.StringtoString()
-
-
-
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:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-