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 classProvides tokens to use when serializing the dependency graph. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate intThe depth of the currently visited dependency node.static final SerializingDependencyNodeVisitor.GraphTokensThe extended ASCII tokens to use when outputing the dependency graph.static final SerializingDependencyNodeVisitor.GraphTokensThe standard ASCII tokens to use when outputing the dependency graph.private final SerializingDependencyNodeVisitor.GraphTokensThe tokens to use when serializing the dependency graph.static final SerializingDependencyNodeVisitor.GraphTokensWhitespace tokens to use when outputing the dependency graph.private final PrintWriterThe 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 TypeMethodDescriptionbooleanendVisit(DependencyNode node) Ends the visit to to the specified dependency node.private voidindent(DependencyNode node) Writes the necessary tokens to indent the specified dependency node to this visitor's writer.private booleanisLast(DependencyNode node) Gets whether the specified dependency node is the last of its siblings.private booleanisLast(DependencyNode node, int ancestorDepth) Gets whether the specified dependency node ancestor is the last of its siblings.booleanvisit(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