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 DependencyNodevisitor - the dependency node visitor to usepublic org.apache.maven.artifact.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 List<org.apache.maven.model.Exclusion> getExclusions()
getExclusions in interface DependencyNodepublic String toNodeString()
DependencyNodetoNodeString in interface DependencyNodeCopyright © 2002–2024 The Apache Software Foundation. All rights reserved.