Class ConsoleDependencyGraphDumper
- java.lang.Object
-
- org.apache.maven.resolver.examples.util.ConsoleDependencyGraphDumper
-
- All Implemented Interfaces:
DependencyVisitor
public class ConsoleDependencyGraphDumper extends java.lang.Object implements DependencyVisitor
A dependency visitor that dumps the graph to the console.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static classConsoleDependencyGraphDumper.ChildInfo
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<ConsoleDependencyGraphDumper.ChildInfo>childInfosprivate java.io.PrintStreamout
-
Constructor Summary
Constructors Constructor Description ConsoleDependencyGraphDumper()ConsoleDependencyGraphDumper(java.io.PrintStream out)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private java.lang.StringformatIndentation()private java.lang.StringformatNode(DependencyNode node)booleanvisitEnter(DependencyNode node)Notifies the visitor of a node visit before its children have been processed.booleanvisitLeave(DependencyNode node)Notifies the visitor of a node visit after its children have been processed.
-
-
-
Field Detail
-
out
private java.io.PrintStream out
-
childInfos
private java.util.List<ConsoleDependencyGraphDumper.ChildInfo> childInfos
-
-
Method Detail
-
visitEnter
public boolean visitEnter(DependencyNode node)
Description copied from interface:DependencyVisitorNotifies the visitor of a node visit before its children have been processed.- Specified by:
visitEnterin interfaceDependencyVisitor- Parameters:
node- The dependency node being visited, must not benull.- Returns:
trueto visit child nodes of the specified node as well,falseto skip children.
-
formatIndentation
private java.lang.String formatIndentation()
-
formatNode
private java.lang.String formatNode(DependencyNode node)
-
visitLeave
public boolean visitLeave(DependencyNode node)
Description copied from interface:DependencyVisitorNotifies the visitor of a node visit after its children have been processed. Note that this method is always invoked regardless whether any children have actually been visited.- Specified by:
visitLeavein interfaceDependencyVisitor- Parameters:
node- The dependency node being visited, must not benull.- Returns:
trueto visit siblings nodes of the specified node as well,falseto skip siblings.
-
-