Package org.apache.maven.internal.impl
Class DefaultDependency
java.lang.Object
org.apache.maven.internal.impl.DefaultDependency
- All Implemented Interfaces:
Artifact
,Dependency
-
Constructor Summary
ConstructorDescriptionDefaultDependency
(AbstractSession session, org.eclipse.aether.graph.Dependency dependency) -
Method Summary
Modifier and TypeMethodDescriptionboolean
The artifactId of the artifact.The classifier of the artifact.org.eclipse.aether.graph.Dependency
The file extension of the artifact.The groupId of the artifact.getScope()
getType()
The artifact type.The version of the artifact.int
hashCode()
boolean
boolean
Determines whether this artifact uses a snapshot version.key()
Returns a unique identifier for this artifact.Creates aDependencyCoordinate
based on thisDependency
.toString()
-
Constructor Details
-
DefaultDependency
public DefaultDependency(@Nonnull AbstractSession session, @Nonnull org.eclipse.aether.graph.Dependency dependency)
-
-
Method Details
-
key
Description copied from interface:Artifact
Returns a unique identifier for this artifact. The identifier is composed of groupId, artifactId, version, classifier, extension. -
getDependency
-
getGroupId
Description copied from interface:Artifact
The groupId of the artifact.- Specified by:
getGroupId
in interfaceArtifact
- Returns:
- the groupId
-
getArtifactId
Description copied from interface:Artifact
The artifactId of the artifact.- Specified by:
getArtifactId
in interfaceArtifact
- Returns:
- the artifactId
-
getClassifier
Description copied from interface:Artifact
The classifier of the artifact.- Specified by:
getClassifier
in interfaceArtifact
- Returns:
- the classifier or an empty string if none, never
null
-
getVersion
Description copied from interface:Artifact
The version of the artifact.- Specified by:
getVersion
in interfaceArtifact
- Returns:
- the version
-
getExtension
Description copied from interface:Artifact
The file extension of the artifact.- Specified by:
getExtension
in interfaceArtifact
- Returns:
- the extension
-
getType
Description copied from interface:Dependency
The artifact type.- Specified by:
getType
in interfaceDependency
- Returns:
- the artifact type, never
null
-
isSnapshot
public boolean isSnapshot()Description copied from interface:Artifact
Determines whether this artifact uses a snapshot version.- Specified by:
isSnapshot
in interfaceArtifact
- Returns:
true
if the artifact is a snapshot,false
otherwise- See Also:
-
getScope
- Specified by:
getScope
in interfaceDependency
-
isOptional
- Specified by:
isOptional
in interfaceDependency
-
toCoordinate
Description copied from interface:Dependency
Creates aDependencyCoordinate
based on thisDependency
.- Specified by:
toCoordinate
in interfaceArtifact
- Specified by:
toCoordinate
in interfaceDependency
- Returns:
- a
DependencyCoordinate
- See Also:
-
equals
-
hashCode
public int hashCode() -
toString
-