org.apache.maven.shared.dependency.graph.internal
Class DefaultDependencyNode

java.lang.Object
  extended by org.apache.maven.shared.dependency.graph.internal.DefaultDependencyNode
All Implemented Interfaces:
DependencyNode

public class DefaultDependencyNode
extends Object
implements DependencyNode


Constructor Summary
DefaultDependencyNode(DependencyNode parent, Artifact artifact, String premanagedVersion, String premanagedScope, String versionConstraint)
           
 
Method Summary
 boolean accept(DependencyNodeVisitor visitor)
          Applies the specified dependency node visitor to this dependency node and its children.
 Artifact getArtifact()
           
 List<DependencyNode> getChildren()
           
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultDependencyNode

public DefaultDependencyNode(DependencyNode parent,
                             Artifact artifact,
                             String premanagedVersion,
                             String premanagedScope,
                             String versionConstraint)
Method Detail

accept

public boolean accept(DependencyNodeVisitor visitor)
Applies the specified dependency node visitor to this dependency node and its children.

Specified by:
accept in interface DependencyNode
Parameters:
visitor - the dependency node visitor to use
Returns:
the visitor result of ending the visit to this node
Since:
1.1

getArtifact

public Artifact getArtifact()
Specified by:
getArtifact in interface DependencyNode

setChildren

public void setChildren(List<DependencyNode> children)

getChildren

public List<DependencyNode> getChildren()
Specified by:
getChildren in interface DependencyNode

getParent

public DependencyNode getParent()
Description copied from interface: DependencyNode
Gets the parent dependency node of this dependency node.

Specified by:
getParent in interface DependencyNode
Returns:
the parent dependency node

getPremanagedVersion

public String getPremanagedVersion()
Description copied from interface: DependencyNode
Gets the version or version range for the dependency before dependency management was applied (if any).

Specified by:
getPremanagedVersion in interface DependencyNode
Returns:
The dependency version before dependency management or null if the version was not managed.

getPremanagedScope

public String getPremanagedScope()
Description copied from interface: DependencyNode
Gets the scope for the dependency before dependency management was applied (if any).

Specified by:
getPremanagedScope in interface DependencyNode
Returns:
The dependency scope before dependency management or null if the scope was not managed.

getVersionConstraint

public String getVersionConstraint()
Description copied from interface: DependencyNode
A constraint on versions for a dependency. A constraint can either consist of one or more version ranges or a single version.

Specified by:
getVersionConstraint in interface DependencyNode
Returns:
The constraint on the dependency.

toNodeString

public String toNodeString()
Description copied from interface: DependencyNode
Returns a string representation of this dependency node.

Specified by:
toNodeString in interface DependencyNode
Returns:
the string representation


Copyright © 2002-2013 The Apache Software Foundation. All Rights Reserved.