public final class DefaultDependencyNode extends Object implements DependencyNode
| Constructor and Description |
|---|
DefaultDependencyNode()
Creates an empty dependency node.
|
DefaultDependencyNode(Dependency dependency)
Creates a new root node with the specified dependency.
|
DefaultDependencyNode(DependencyNode node)
Creates a shallow clone of the specified node.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
accept(DependencyVisitor visitor)
Traverses this node and potentially its children using the specified visitor.
|
Collection<Artifact> |
getAliases()
Gets the known aliases for this dependency's artifact.
|
List<DependencyNode> |
getChildren()
Gets the child nodes of this node.
|
Map<Object,Object> |
getData()
Gets the custom data associated with this dependency node.
|
Dependency |
getDependency()
Gets the dependency associated with this 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).
|
List<Artifact> |
getRelocations()
Gets the sequence of relocations that was followed to resolve the artifact referenced by the dependency.
|
List<RemoteRepository> |
getRepositories()
Gets the remote repositories from which this node's artifact shall be resolved.
|
String |
getRequestContext()
Gets the request context in which this dependency node was created.
|
Version |
getVersion()
Gets the version that was selected for the dependency's target artifact.
|
VersionConstraint |
getVersionConstraint()
Gets the version constraint that was parsed from the dependency's version declaration.
|
void |
setAliases(Collection<Artifact> aliases)
Sets the known aliases for this dependency's artifact.
|
void |
setArtifact(Artifact artifact)
Sets the artifact of the dependency.
|
void |
setData(Map<Object,Object> data) |
void |
setData(Object key,
Object value)
Associates the specified dependency node data with the given key.
|
void |
setDependency(Dependency dependency) |
void |
setPremanagedScope(String premanagedScope)
Sets the scope for this dependency before dependency management was applied (if any).
|
void |
setPremanagedVersion(String premanagedVersion)
Sets the version or version range for this dependency before dependency management was applied (if any).
|
void |
setRelocations(List<Artifact> relocations)
Sets the sequence of relocations that was followed to resolve this dependency's artifact.
|
void |
setRepositories(List<RemoteRepository> repositories)
Sets the remote repositories from which this node's artifact shall be resolved.
|
void |
setRequestContext(String context)
Sets the request context in which this dependency node was created.
|
void |
setScope(String scope)
Sets the scope of the dependency.
|
void |
setVersion(Version version) |
void |
setVersionConstraint(VersionConstraint versionConstraint) |
String |
toString() |
public DefaultDependencyNode()
public DefaultDependencyNode(Dependency dependency)
dependency - The dependency associated with this node, may be null.public DefaultDependencyNode(DependencyNode node)
node - The node to copy, must not be null.public List<DependencyNode> getChildren()
DependencyNodegetChildren in interface DependencyNodenull.public Dependency getDependency()
DependencyNodegetDependency in interface DependencyNodenull if none.public void setDependency(Dependency dependency)
public void setArtifact(Artifact artifact)
DependencyNodesetArtifact in interface DependencyNodeartifact - The artifact satisfying the dependency, must not be null.public List<Artifact> getRelocations()
DependencyNodegetRelocations in interface DependencyNodenull.public void setRelocations(List<Artifact> relocations)
relocations - The sequence of relocations, may be null.public Collection<Artifact> getAliases()
DependencyNodegetAliases in interface DependencyNodenull.public void setAliases(Collection<Artifact> aliases)
aliases - The known aliases, may be null.public VersionConstraint getVersionConstraint()
DependencyNodegetVersionConstraint in interface DependencyNodenull.public void setVersionConstraint(VersionConstraint versionConstraint)
public Version getVersion()
DependencyNodegetVersion in interface DependencyNodenull.public void setVersion(Version version)
public void setScope(String scope)
DependencyNodesetScope in interface DependencyNodescope - The scope, may be null.public String getPremanagedVersion()
DependencyNodegetPremanagedVersion in interface DependencyNodenull if the version was not managed.public void setPremanagedVersion(String premanagedVersion)
premanagedVersion - The originally declared dependency version or null if the version was not
managed.public String getPremanagedScope()
DependencyNodegetPremanagedScope in interface DependencyNodenull if the scope was not managed.public void setPremanagedScope(String premanagedScope)
premanagedScope - The originally declared dependency scope or null if the scope was not managed.public List<RemoteRepository> getRepositories()
DependencyNodegetRepositories in interface DependencyNodenull.public void setRepositories(List<RemoteRepository> repositories)
repositories - The remote repositories to use for artifact resolution, may be null.public String getRequestContext()
DependencyNodegetRequestContext in interface DependencyNodenull.public void setRequestContext(String context)
DependencyNodesetRequestContext in interface DependencyNodecontext - The context, may be null.public Map<Object,Object> getData()
DependencyNodegetData in interface DependencyNodenull.public void setData(Object key, Object value)
DependencyNodeDependencyNode.getData() is being iterated.setData in interface DependencyNodekey - The key under which to store the data, must not be null.value - The data to associate with the key, may be null to remove the mapping.public boolean accept(DependencyVisitor visitor)
DependencyNodeaccept in interface DependencyNodevisitor - The visitor to call back, must not be null.true to visit siblings nodes of this node as well, false to skip siblings.Copyright © 2010-2012 The Eclipse Foundation. All Rights Reserved.