|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.sonatype.aether.test.util.impl.TestDependencyNode
public class TestDependencyNode
A node within a dependency graph.
Constructor Summary | |
---|---|
TestDependencyNode()
Creates an empty dependency node. |
|
TestDependencyNode(Dependency dependency)
Creates a new root node with the specified dependency. |
|
TestDependencyNode(DependencyNode node)
Creates a shallow clone of the specified node. |
Method Summary | |
---|---|
boolean |
accept(DependencyVisitor visitor)
Traverses this node and potentially its children using the specified visitor. |
java.util.Collection<Artifact> |
getAliases()
Gets the known aliases for this dependency's artifact. |
java.util.List<DependencyNode> |
getChildren()
Gets the child nodes of this node. |
java.util.Map<java.lang.Object,java.lang.Object> |
getData()
Gets the custom data associated with this dependency node. |
Dependency |
getDependency()
Gets the dependency associated with this node. |
java.lang.String |
getPremanagedScope()
Gets the scope for the dependency before dependency management was applied (if any). |
java.lang.String |
getPremanagedVersion()
Gets the version or version range for the dependency before dependency management was applied (if any). |
java.util.List<Artifact> |
getRelocations()
Gets the sequence of relocations that was followed to resolve the artifact referenced by the dependency. |
java.util.List<RemoteRepository> |
getRepositories()
Gets the remote repositories from which this node's artifact shall be resolved. |
java.lang.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(java.util.Collection<Artifact> aliases)
Sets the known aliases for this dependency's artifact. |
void |
setArtifact(Artifact artifact)
Sets the artifact of the dependency. |
void |
setData(java.lang.Object key,
java.lang.Object value)
Associates the specified dependency node data with the given key. |
void |
setDependency(Dependency dependency)
|
void |
setPremanagedScope(java.lang.String premanagedScope)
Sets the scope for this dependency before dependency management was applied (if any). |
void |
setPremanagedVersion(java.lang.String premanagedVersion)
Sets the version or version range for this dependency before dependency management was applied (if any). |
void |
setRelocations(java.util.List<Artifact> relocations)
Sets the sequence of relocations that was followed to resolve this dependency's artifact. |
void |
setRepositories(java.util.List<RemoteRepository> repositories)
Sets the remote repositories from which this node's artifact shall be resolved. |
void |
setRequestContext(java.lang.String context)
Sets the request context in which this dependency node was created. |
void |
setScope(java.lang.String scope)
Sets the scope of the dependency. |
void |
setVersion(Version version)
|
void |
setVersionConstraint(VersionConstraint versionConstraint)
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public TestDependencyNode()
public TestDependencyNode(Dependency dependency)
dependency
- The dependency associated with this node, may be null
.public TestDependencyNode(DependencyNode node)
node
- The node to copy, must not be null
.Method Detail |
---|
public java.util.List<DependencyNode> getChildren()
DependencyNode
getChildren
in interface DependencyNode
null
.public Dependency getDependency()
DependencyNode
getDependency
in interface DependencyNode
null
if none.public void setDependency(Dependency dependency)
public void setArtifact(Artifact artifact)
DependencyNode
setArtifact
in interface DependencyNode
artifact
- The artifact satisfying the dependency, must not be null
.public java.util.List<Artifact> getRelocations()
DependencyNode
getRelocations
in interface DependencyNode
null
.public void setRelocations(java.util.List<Artifact> relocations)
relocations
- The sequence of relocations, may be null
.public java.util.Collection<Artifact> getAliases()
DependencyNode
getAliases
in interface DependencyNode
null
.public void setAliases(java.util.Collection<Artifact> aliases)
aliases
- The known aliases, may be null
.public VersionConstraint getVersionConstraint()
DependencyNode
getVersionConstraint
in interface DependencyNode
null
.public void setVersionConstraint(VersionConstraint versionConstraint)
public Version getVersion()
DependencyNode
getVersion
in interface DependencyNode
null
.public void setVersion(Version version)
public void setScope(java.lang.String scope)
DependencyNode
setScope
in interface DependencyNode
scope
- The scope, may be null
.public java.lang.String getPremanagedVersion()
DependencyNode
getPremanagedVersion
in interface DependencyNode
null
if the version was not managed.public void setPremanagedVersion(java.lang.String premanagedVersion)
premanagedVersion
- The originally declared dependency version or null
if the version was not
managed.public java.lang.String getPremanagedScope()
DependencyNode
getPremanagedScope
in interface DependencyNode
null
if the scope was not managed.public void setPremanagedScope(java.lang.String premanagedScope)
premanagedScope
- The originally declared dependency scope or null
if the scope was not managed.public java.util.List<RemoteRepository> getRepositories()
DependencyNode
getRepositories
in interface DependencyNode
null
.public void setRepositories(java.util.List<RemoteRepository> repositories)
repositories
- The remote repositories to use for artifact resolution, may be null
.public java.lang.String getRequestContext()
DependencyNode
getRequestContext
in interface DependencyNode
null
.public void setRequestContext(java.lang.String context)
DependencyNode
setRequestContext
in interface DependencyNode
context
- The context, may be null
.public java.util.Map<java.lang.Object,java.lang.Object> getData()
DependencyNode
getData
in interface DependencyNode
null
.public void setData(java.lang.Object key, java.lang.Object value)
DependencyNode
DependencyNode.getData()
is being iterated.
setData
in interface DependencyNode
key
- 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)
DependencyNode
accept
in interface DependencyNode
visitor
- The visitor to call back, must not be null
.
true
to visit siblings nodes of this node as well, false
to skip siblings.public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |