public class DefaultDependencyNode extends Object implements DependencyNode
| Constructor and Description |
|---|
DefaultDependencyNode(DependencyNode parent,
Artifact artifact,
String premanagedVersion,
String premanagedScope,
String versionConstraint)
Constructs the DefaultDependencyNode.
|
DefaultDependencyNode(DependencyNode parent,
Artifact artifact,
String premanagedVersion,
String premanagedScope,
String versionConstraint,
Boolean optional) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
accept(DependencyNodeVisitor visitor)
Applies the specified dependency node visitor to this dependency node and its children.
|
Artifact |
getArtifact() |
List<DependencyNode> |
getChildren() |
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, 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 boolean accept(DependencyNodeVisitor visitor)
accept in interface DependencyNodevisitor - the dependency node visitor to usepublic Artifact getArtifact()
getArtifact in interface DependencyNodepublic void setChildren(List<DependencyNode> children)
children - List of DependencyNode to set as child nodes.public List<DependencyNode> getChildren()
getChildren in interface DependencyNodepublic DependencyNode getParent()
DependencyNodegetParent in interface DependencyNodepublic String getPremanagedVersion()
DependencyNodegetPremanagedVersion in interface DependencyNodenull if the version was not managed.public String getPremanagedScope()
DependencyNodegetPremanagedScope in interface DependencyNodenull if the scope was not managed.public String getVersionConstraint()
DependencyNodegetVersionConstraint in interface DependencyNodepublic Boolean getOptional()
getOptional in interface DependencyNodepublic String toNodeString()
DependencyNodetoNodeString in interface DependencyNodeCopyright © 2002–2015 The Apache Software Foundation. All rights reserved.