wt.visitor
Class VisitorAdapter

java.lang.Object
  extended by wt.visitor.VisitorAdapter
All Implemented Interfaces:
Visitor
Direct Known Subclasses:
BaselineVisitor, ConfigurationVisitor, DocumentContentStructureVisitor, DocumentStructureVisitor, EffVisitor, MultilevelWhereUsedVisitor, RemoveConfigurationVisitor, TextOutputVisitor

public class VisitorAdapter
extends Object
implements Visitor

This class provides a default "no-op" implementation of a Visitor. The intent for this class is to provide a convenience to programmers for implementing a Visitor. If only a single visit method needs to be implemented, a class should extend the VisitorAdapter and only override the single visit method.

Each of the visit methods in this class is implemented and simply returns true.



Supported API: true

Extendable: true


Method Summary
 boolean visit(Persistable fromNode, Link link, Persistable toNode, int level, boolean previouslyVisited)
          Visit a node.
 boolean visitLevel(Persistable fromNode, Vector links, Vector toNodes, int level)
          Vist nodes at this level.
 boolean visitLevel(Vector fromNodes, Vector links, Vector toNodes, int level)
          Vist nodes at this level.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

visit

public boolean visit(Persistable fromNode,
                     Link link,
                     Persistable toNode,
                     int level,
                     boolean previouslyVisited)
              throws WTException
Visit a node. If false is returned, then the node will not be traversed.

Supported API: true

Specified by:
visit in interface Visitor
Parameters:
fromNode -
link -
toNode -
level -
previouslyVisited -
Returns:
boolean
Throws:
WTException

visitLevel

public boolean visitLevel(Persistable fromNode,
                          Vector links,
                          Vector toNodes,
                          int level)
                   throws WTException
Vist nodes at this level. If false is returned, then none of the nodes on this level will be traversed.

Supported API: true

Specified by:
visitLevel in interface Visitor
Parameters:
fromNode -
links -
toNodes -
level -
Returns:
boolean
Throws:
WTException

visitLevel

public boolean visitLevel(Vector fromNodes,
                          Vector links,
                          Vector toNodes,
                          int level)
                   throws WTException
Vist nodes at this level. If false is returned, then none of the nodes on this level will be traversed.

Supported API: true

Specified by:
visitLevel in interface Visitor
Parameters:
fromNodes -
links -
toNodes -
level -
Returns:
boolean
Throws:
WTException