Class SerializingDependencyNodeVisitor
java.lang.Object
org.apache.maven.shared.dependency.graph.traversal.SerializingDependencyNodeVisitor
- All Implemented Interfaces:
DependencyNodeVisitor
A dependency node visitor that serializes visited nodes to a writer.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Provides tokens to use when serializing the dependency graph. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate int
The depth of the currently visited dependency node.static final SerializingDependencyNodeVisitor.GraphTokens
The extended ASCII tokens to use when outputing the dependency graph.static final SerializingDependencyNodeVisitor.GraphTokens
The standard ASCII tokens to use when outputing the dependency graph.private final SerializingDependencyNodeVisitor.GraphTokens
The tokens to use when serializing the dependency graph.static final SerializingDependencyNodeVisitor.GraphTokens
Whitespace tokens to use when outputing the dependency graph.private final PrintWriter
The writer to serialize to. -
Constructor Summary
ConstructorsConstructorDescriptionCreates a dependency node visitor that serializes visited nodes to the specified writer using whitespace tokens.SerializingDependencyNodeVisitor
(Writer writer, SerializingDependencyNodeVisitor.GraphTokens tokens) Creates a dependency node visitor that serializes visited nodes to the specified writer using the specified tokens. -
Method Summary
Modifier and TypeMethodDescriptionboolean
endVisit
(DependencyNode node) Ends the visit to to the specified dependency node.private void
indent
(DependencyNode node) Writes the necessary tokens to indent the specified dependency node to this visitor's writer.private boolean
isLast
(DependencyNode node) Gets whether the specified dependency node is the last of its siblings.private boolean
isLast
(DependencyNode node, int ancestorDepth) Gets whether the specified dependency node ancestor is the last of its siblings.boolean
visit
(DependencyNode node) Starts the visit to the specified dependency node.
-
Field Details
-
WHITESPACE_TOKENS
Whitespace tokens to use when outputing the dependency graph. -
STANDARD_TOKENS
The standard ASCII tokens to use when outputing the dependency graph. -
EXTENDED_TOKENS
The extended ASCII tokens to use when outputing the dependency graph. -
writer
The writer to serialize to. -
tokens
The tokens to use when serializing the dependency graph. -
depth
private int depthThe depth of the currently visited dependency node.
-
-
Constructor Details
-
SerializingDependencyNodeVisitor
Creates a dependency node visitor that serializes visited nodes to the specified writer using whitespace tokens.- Parameters:
writer
- the writer to serialize to
-
-
Method Details