Class StaticDependencyTraverser
- java.lang.Object
-
- org.eclipse.aether.util.graph.traverser.StaticDependencyTraverser
-
- All Implemented Interfaces:
DependencyTraverser
public final class StaticDependencyTraverser extends Object implements DependencyTraverser
A dependency traverser which always or never traverses children.
-
-
Constructor Summary
Constructors Constructor Description StaticDependencyTraverser(boolean traverse)
Creates a new traverser with the specified traversal behavior.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DependencyTraverser
deriveChildTraverser(DependencyCollectionContext context)
Derives a dependency traverser that will be used to decide whether the transitive dependencies of the dependency given in the collection context shall be traversed.boolean
equals(Object obj)
int
hashCode()
boolean
traverseDependency(Dependency dependency)
Decides whether the dependencies of the specified dependency should be traversed.
-
-
-
Constructor Detail
-
StaticDependencyTraverser
public StaticDependencyTraverser(boolean traverse)
Creates a new traverser with the specified traversal behavior.- Parameters:
traverse
-true
to traverse all dependencies,false
to never traverse.
-
-
Method Detail
-
traverseDependency
public boolean traverseDependency(Dependency dependency)
Description copied from interface:DependencyTraverser
Decides whether the dependencies of the specified dependency should be traversed.- Specified by:
traverseDependency
in interfaceDependencyTraverser
- Parameters:
dependency
- The dependency to check, must not benull
.- Returns:
true
if the dependency graph builder should recurse into the specified dependency and process its dependencies,false
otherwise.
-
deriveChildTraverser
public DependencyTraverser deriveChildTraverser(DependencyCollectionContext context)
Description copied from interface:DependencyTraverser
Derives a dependency traverser that will be used to decide whether the transitive dependencies of the dependency given in the collection context shall be traversed. When calculating the child traverser, implementors are strongly advised to simply return the current instance if nothing changed to help save memory.- Specified by:
deriveChildTraverser
in interfaceDependencyTraverser
- Parameters:
context
- The dependency collection context, must not benull
.- Returns:
- The dependency traverser for the target node or
null
if dependencies should be unconditionally traversed in the sub graph.
-
-