Class DefaultDependencyNode
java.lang.Object
org.apache.maven.shared.dependency.graph.internal.DefaultDependencyNode
- All Implemented Interfaces:
DependencyNode
Default implementation of a DependencyNode.
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultDependencyNode(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) -
Method Summary
Modifier and TypeMethodDescriptionbooleanaccept(DependencyNodeVisitor visitor) Applies the specified dependency node visitor to this dependency node and its children.org.apache.maven.artifact.ArtifactList<org.apache.maven.model.Exclusion> Gets the parent dependency node of this dependency node.Gets the scope for the dependency before dependency management was applied (if any).Gets the version or version range for the dependency before dependency management was applied (if any).A constraint on versions for a dependency.voidsetChildren(List<DependencyNode> children) Returns a string representation of this dependency node.
-
Constructor Details
-
DefaultDependencyNode
public DefaultDependencyNode(org.apache.maven.artifact.Artifact artifact)
-
Method Details
-
getArtifact
public org.apache.maven.artifact.Artifact getArtifact()- Specified by:
getArtifactin interfaceDependencyNode- Returns:
- Artifact for this DependencyNode.
-
setChildren
- Parameters:
children- List of DependencyNode to set as child nodes.
-
getChildren
- Specified by:
getChildrenin interfaceDependencyNode- Returns:
- List of child nodes for this DependencyNode.
-
getParent
Description copied from interface:DependencyNodeGets the parent dependency node of this dependency node.- Specified by:
getParentin interfaceDependencyNode- Returns:
- Parent of this DependencyNode.
-
getPremanagedVersion
Description copied from interface:DependencyNodeGets the version or version range for the dependency before dependency management was applied (if any).- Specified by:
getPremanagedVersionin interfaceDependencyNode- Returns:
- The dependency version before dependency management or
nullif the version was not managed.
-
getPremanagedScope
Description copied from interface:DependencyNodeGets the scope for the dependency before dependency management was applied (if any).- Specified by:
getPremanagedScopein interfaceDependencyNode- Returns:
- The dependency scope before dependency management or
nullif the scope was not managed.
-
getVersionConstraint
Description copied from interface:DependencyNodeA constraint on versions for a dependency. A constraint can either consist of one or more version ranges or a single version.- Specified by:
getVersionConstraintin interfaceDependencyNode- Returns:
- The constraint on the dependency.
-
getOptional
- Specified by:
getOptionalin interfaceDependencyNode- Returns:
- true for an optional dependency.
-
getExclusions
- Specified by:
getExclusionsin interfaceDependencyNode- Returns:
- the exclusions of the dependency
-
toNodeString
Description copied from interface:DependencyNodeReturns a string representation of this dependency node.- Specified by:
toNodeStringin interfaceDependencyNode- Returns:
- Stringified representation of this DependencyNode.