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
(InternalSession session, org.eclipse.aether.graph.Dependency dependency) -
Method Summary
Modifier and TypeMethodDescriptionboolean
The artifactId of the artifact.The base version 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 dependency 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 InternalSession 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, extension, classifier, and version. -
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
-
getBaseVersion
Description copied from interface:Artifact
The base version of the artifact.- Specified by:
getBaseVersion
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 dependency type.- Specified by:
getType
in interfaceDependency
- Returns:
- the dependency 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
-