Class DependencyGraphDumper
java.lang.Object
org.eclipse.aether.util.graph.visitor.DependencyGraphDumper
- All Implemented Interfaces:
org.eclipse.aether.graph.DependencyVisitor
public class DependencyGraphDumper
extends Object
implements org.eclipse.aether.graph.DependencyVisitor
A dependency visitor that dumps the graph to any
Consumer
<String>
. Meant for diagnostic and testing, as
it may output the graph to standard output, error or even some logging interface.- Since:
- 1.9.8
-
Constructor Summary
ConstructorDescriptionDependencyGraphDumper
(Consumer<String> consumer) Creates instance with given consumer.DependencyGraphDumper
(Consumer<String> consumer, Collection<Function<org.eclipse.aether.graph.DependencyNode, String>> decorators) Creates instance with given consumer and decorators. -
Method Summary
Modifier and TypeMethodDescriptionartifactProperties
(Collection<String> properties) Decorator of "artifact properties": prints out asked properties, if present.defaultsWith
(Collection<Function<org.eclipse.aether.graph.DependencyNode, String>> extras) ExtendsDEFAULT_DECORATORS
decorators with passed in ones.Decorator of "effective dependency": shows effective scope and optionality.protected String
formatIndentation
(Deque<org.eclipse.aether.graph.DependencyNode> nodes) protected String
formatLine
(Deque<org.eclipse.aether.graph.DependencyNode> nodes) protected String
formatNode
(Deque<org.eclipse.aether.graph.DependencyNode> nodes) Decorator of "managed exclusions": explains on nodes what was managed.Decorator of "managed optionality": explains on nodes what was managed.Decorator of "managed properties": explains on nodes what was managed.Decorator of "managed scope": explains on nodes what was managed.Decorator of "managed version": explains on nodes what was managed.Decorator of "range member": explains on nodes what range it participates in.boolean
visitEnter
(org.eclipse.aether.graph.DependencyNode node) boolean
visitLeave
(org.eclipse.aether.graph.DependencyNode node) Decorator of "winner node": explains on losers why lost.
-
Constructor Details
-
DependencyGraphDumper
Creates instance with given consumer.- Parameters:
consumer
- The string consumer, must not benull
.
-
DependencyGraphDumper
public DependencyGraphDumper(Consumer<String> consumer, Collection<Function<org.eclipse.aether.graph.DependencyNode, String>> decorators) Creates instance with given consumer and decorators.- Parameters:
consumer
- The string consumer, must not benull
.decorators
- The decorators to apply, must not benull
.- Since:
- 2.0.0
-
-
Method Details
-
effectiveDependency
Decorator of "effective dependency": shows effective scope and optionality. -
premanagedVersion
Decorator of "managed version": explains on nodes what was managed. -
premanagedScope
Decorator of "managed scope": explains on nodes what was managed. -
premanagedOptional
Decorator of "managed optionality": explains on nodes what was managed. -
premanagedExclusions
Decorator of "managed exclusions": explains on nodes what was managed. -
premanagedProperties
Decorator of "managed properties": explains on nodes what was managed. -
rangeMember
Decorator of "range member": explains on nodes what range it participates in. -
winnerNode
Decorator of "winner node": explains on losers why lost. -
artifactProperties
public static Function<org.eclipse.aether.graph.DependencyNode,String> artifactProperties(Collection<String> properties) Decorator of "artifact properties": prints out asked properties, if present. -
defaultsWith
public static List<Function<org.eclipse.aether.graph.DependencyNode,String>> defaultsWith(Collection<Function<org.eclipse.aether.graph.DependencyNode, String>> extras) ExtendsDEFAULT_DECORATORS
decorators with passed in ones.- Since:
- 2.0.0
-
visitEnter
- Specified by:
visitEnter
in interfaceorg.eclipse.aether.graph.DependencyVisitor
-
visitLeave
- Specified by:
visitLeave
in interfaceorg.eclipse.aether.graph.DependencyVisitor
-
formatLine
-
formatIndentation
-
formatNode
-