org.apache.maven.shared.dependency.tree.traversal
Class SerializingDependencyNodeVisitor

java.lang.Object
  extended by org.apache.maven.shared.dependency.tree.traversal.SerializingDependencyNodeVisitor
All Implemented Interfaces:
DependencyNodeVisitor

public class SerializingDependencyNodeVisitor
extends Object
implements DependencyNodeVisitor

A dependency node visitor that serializes visited nodes to a writer.

Since:
1.1
Version:
$Id: SerializingDependencyNodeVisitor.java 1100703 2011-05-08 08:27:33Z hboutemy $
Author:
Mark Hobson

Nested Class Summary
static class SerializingDependencyNodeVisitor.TreeTokens
          Provides tokens to use when serializing the dependency tree.
 
Field Summary
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.
static SerializingDependencyNodeVisitor.TreeTokens WHITESPACE_TOKENS
          Whitespace tokens to use when outputing the dependency tree.
 
Constructor Summary
SerializingDependencyNodeVisitor(Writer writer)
          Creates a dependency node visitor that serializes visited nodes to the specified writer using whitespace tokens.
SerializingDependencyNodeVisitor(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.
 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

WHITESPACE_TOKENS

public static final SerializingDependencyNodeVisitor.TreeTokens WHITESPACE_TOKENS
Whitespace tokens to use when outputing the dependency tree.


STANDARD_TOKENS

public static final SerializingDependencyNodeVisitor.TreeTokens STANDARD_TOKENS
The standard ASCII tokens to use when outputing the dependency tree.


EXTENDED_TOKENS

public static final SerializingDependencyNodeVisitor.TreeTokens EXTENDED_TOKENS
The extended ASCII tokens to use when outputing the dependency tree.

Constructor Detail

SerializingDependencyNodeVisitor

public SerializingDependencyNodeVisitor(Writer writer)
Creates a dependency node visitor that serializes visited nodes to the specified writer using whitespace tokens.

Parameters:
writer - the writer to serialize to

SerializingDependencyNodeVisitor

public SerializingDependencyNodeVisitor(Writer writer,
                                        SerializingDependencyNodeVisitor.TreeTokens tokens)
Creates a dependency node visitor that serializes visited nodes to the specified writer using the specified tokens.

Parameters:
writer - the writer to serialize to
tokens - the tokens to use when serializing the dependency tree
Method Detail

visit

public boolean visit(DependencyNode node)
Starts the visit to the specified dependency node.

Specified by:
visit in interface DependencyNodeVisitor
Parameters:
node - the dependency node to visit
Returns:
true to visit the specified dependency node's children, false to skip the specified dependency node's children and proceed to its next sibling

endVisit

public boolean endVisit(DependencyNode node)
Ends the visit to to the specified dependency node.

Specified by:
endVisit in interface DependencyNodeVisitor
Parameters:
node - the dependency node to visit
Returns:
true to visit the specified dependency node's next sibling, false to skip the specified dependency node's next siblings and proceed to its parent


Copyright © 2002-2013 The Apache Software Foundation. All Rights Reserved.