|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.maven.shared.dependency.tree.traversal.SerializingDependencyNodeVisitor
public class SerializingDependencyNodeVisitor
A dependency node visitor that serializes visited nodes to a writer.
Nested Class Summary | |
---|---|
static class |
SerializingDependencyNodeVisitor.TreeTokens
Provides tokens to use when serializing the dependency tree. |
Field Summary | |
---|---|
private int |
depth
The depth of the currently visited dependency node. |
static SerializingDependencyNodeVisitor.TreeTokens |
EXTENDED_TOKENS
The extended ASCII tokens to use when outputing the dependency tree. |
static SerializingDependencyNodeVisitor.TreeTokens |
STANDARD_TOKENS
The standard ASCII tokens to use when outputing the dependency tree. |
private SerializingDependencyNodeVisitor.TreeTokens |
tokens
The tokens to use when serializing the dependency tree. |
static SerializingDependencyNodeVisitor.TreeTokens |
WHITESPACE_TOKENS
Whitespace tokens to use when outputing the dependency tree. |
private java.io.PrintWriter |
writer
The writer to serialize to. |
Constructor Summary | |
---|---|
SerializingDependencyNodeVisitor(java.io.Writer writer)
Creates a dependency node visitor that serializes visited nodes to the specified writer using whitespace tokens. |
|
SerializingDependencyNodeVisitor(java.io.Writer writer,
SerializingDependencyNodeVisitor.TreeTokens tokens)
Creates a dependency node visitor that serializes visited nodes to the specified writer using the specified tokens. |
Method Summary | |
---|---|
boolean |
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final SerializingDependencyNodeVisitor.TreeTokens WHITESPACE_TOKENS
public static final SerializingDependencyNodeVisitor.TreeTokens STANDARD_TOKENS
public static final SerializingDependencyNodeVisitor.TreeTokens EXTENDED_TOKENS
private final java.io.PrintWriter writer
private final SerializingDependencyNodeVisitor.TreeTokens tokens
private int depth
Constructor Detail |
---|
public SerializingDependencyNodeVisitor(java.io.Writer writer)
writer
- the writer to serialize topublic SerializingDependencyNodeVisitor(java.io.Writer writer, SerializingDependencyNodeVisitor.TreeTokens tokens)
writer
- the writer to serialize totokens
- the tokens to use when serializing the dependency treeMethod Detail |
---|
public boolean visit(DependencyNode node)
DependencyNodeVisitor
visit
in interface DependencyNodeVisitor
node
- the dependency node to visit
true
to visit the specified dependency node's children, false
to skip the
specified dependency node's children and proceed to its next siblingpublic boolean endVisit(DependencyNode node)
DependencyNodeVisitor
endVisit
in interface DependencyNodeVisitor
node
- the dependency node to visit
true
to visit the specified dependency node's next sibling, false
to skip
the specified dependency node's next siblings and proceed to its parentprivate void indent(DependencyNode node)
node
- the dependency node to indentprivate boolean isLast(DependencyNode node)
node
- the dependency node to check
true
if the specified dependency node is the last of its last siblingsprivate boolean isLast(DependencyNode node, int ancestorDepth)
node
- the dependency node whose ancestor to checkancestorDepth
- the depth of the ancestor of the specified dependency node to check
true
if the specified dependency node ancestor is the last of its siblings
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |