Class ResolvedArtifact
- java.lang.Object
-
- software.amazon.smithy.cli.dependencies.ResolvedArtifact
-
-
Constructor Summary
Constructors Constructor Description ResolvedArtifact(java.nio.file.Path path, java.lang.String groupId, java.lang.String artifactId, java.lang.String version)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object o)static ResolvedArtifactfromCoordinateNode(java.lang.String coordinates, Node node)Creates a resolved artifact from a Maven coordinates string and Node.static ResolvedArtifactfromCoordinates(java.nio.file.Path location, java.lang.String coordinates)Creates a resolved artifact from a file path and Maven coordinates string.java.lang.StringgetArtifactId()java.lang.StringgetCoordinates()Get the resolved coordinates (e.g., group:artifact:version).java.lang.StringgetGroupId()longgetLastModified()java.nio.file.PathgetPath()Get the path to the artifact on disk.java.lang.StringgetShaSum()java.lang.StringgetVersion()inthashCode()NodetoNode()Converts a value to aNode.java.lang.StringtoString()
-
-
-
Method Detail
-
fromCoordinates
public static ResolvedArtifact fromCoordinates(java.nio.file.Path location, java.lang.String coordinates)
Creates a resolved artifact from a file path and Maven coordinates string.- Parameters:
location- Location of the artifact.coordinates- Maven coordinates (e.g., group:artifact:version).- Returns:
- Returns the created artifact.
- Throws:
DependencyResolverException- if the provided coordinates are invalid.
-
fromCoordinateNode
public static ResolvedArtifact fromCoordinateNode(java.lang.String coordinates, Node node)
Creates a resolved artifact from a Maven coordinates string and Node.- Parameters:
coordinates- Maven coordinates (e.g., group:artifact:version).node- Node containing the resolved artifact data.- Returns:
- Returns the created artifact
-
getPath
public java.nio.file.Path getPath()
Get the path to the artifact on disk.- Returns:
- Returns the location of the downloaded artifact.
-
getCoordinates
public java.lang.String getCoordinates()
Get the resolved coordinates (e.g., group:artifact:version).- Returns:
- Returns the resolved coordinates.
-
getGroupId
public java.lang.String getGroupId()
- Returns:
- Get the group ID of the artifact.
-
getArtifactId
public java.lang.String getArtifactId()
- Returns:
- Get the artifact ID of the artifact.
-
getVersion
public java.lang.String getVersion()
- Returns:
- Get the version of the artifact.
-
getShaSum
public java.lang.String getShaSum()
- Returns:
- Get the sha1 digest of the artifact.
-
getLastModified
public long getLastModified()
- Returns:
- Get the last time the artifact was modified.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
-