public class DefaultDependencyNode extends Object implements DependencyNode
Constructor and Description |
---|
DefaultDependencyNode(org.apache.maven.artifact.Artifact artifact) |
DefaultDependencyNode(DependencyNode parent,
org.apache.maven.artifact.Artifact artifact,
String premanagedVersion,
String premanagedScope,
String versionConstraint)
Constructs the DefaultDependencyNode.
|
DefaultDependencyNode(DependencyNode parent,
org.apache.maven.artifact.Artifact artifact,
String premanagedVersion,
String premanagedScope,
String versionConstraint,
Boolean optional,
List<org.apache.maven.model.Exclusion> exclusions) |
Modifier and Type | Method and Description |
---|---|
boolean |
accept(DependencyNodeVisitor visitor)
Applies the specified dependency node visitor to this dependency node and its children.
|
org.apache.maven.artifact.Artifact |
getArtifact() |
List<DependencyNode> |
getChildren() |
List<org.apache.maven.model.Exclusion> |
getExclusions() |
Boolean |
getOptional() |
DependencyNode |
getParent()
Gets the parent dependency node of this dependency node.
|
String |
getPremanagedScope()
Gets the scope for the dependency before dependency management was applied (if any).
|
String |
getPremanagedVersion()
Gets the version or version range for the dependency before dependency management was applied (if any).
|
String |
getVersionConstraint()
A constraint on versions for a dependency.
|
void |
setChildren(List<DependencyNode> children) |
String |
toNodeString()
Returns a string representation of this dependency node.
|
public DefaultDependencyNode(DependencyNode parent, org.apache.maven.artifact.Artifact artifact, String premanagedVersion, String premanagedScope, String versionConstraint)
parent
- Parent node, may be null
.artifact
- Artifact associated with this dependency.premanagedVersion
- the premanaged version, may be null
.premanagedScope
- the premanaged scope, may be null
.versionConstraint
- the version constraint, may be null.
public DefaultDependencyNode(DependencyNode parent, org.apache.maven.artifact.Artifact artifact, String premanagedVersion, String premanagedScope, String versionConstraint, Boolean optional, List<org.apache.maven.model.Exclusion> exclusions)
public DefaultDependencyNode(org.apache.maven.artifact.Artifact artifact)
public boolean accept(DependencyNodeVisitor visitor)
accept
in interface DependencyNode
visitor
- the dependency node visitor to usepublic org.apache.maven.artifact.Artifact getArtifact()
getArtifact
in interface DependencyNode
public void setChildren(List<DependencyNode> children)
children
- List of DependencyNode to set as child nodes.public List<DependencyNode> getChildren()
getChildren
in interface DependencyNode
public DependencyNode getParent()
DependencyNode
getParent
in interface DependencyNode
public String getPremanagedVersion()
DependencyNode
getPremanagedVersion
in interface DependencyNode
null
if the version was not managed.public String getPremanagedScope()
DependencyNode
getPremanagedScope
in interface DependencyNode
null
if the scope was not managed.public String getVersionConstraint()
DependencyNode
getVersionConstraint
in interface DependencyNode
public Boolean getOptional()
getOptional
in interface DependencyNode
public List<org.apache.maven.model.Exclusion> getExclusions()
getExclusions
in interface DependencyNode
public String toNodeString()
DependencyNode
toNodeString
in interface DependencyNode
Copyright © 2002–2024 The Apache Software Foundation. All rights reserved.