Class NodeDisplacementVisitor

  extended bycom.bbn.swede.core.dom.NodeDisplacementVisitor
All Implemented Interfaces:

public class NodeDisplacementVisitor
extends Object
implements IOASTNodeVisitor

A visitor to adjust the position of nodes in the OAST to reflect a character displacement.

Field Summary
protected  int _iOffsetLength
          The length of the displacement.
protected  int _iStartOffset
          The starting offset of the displacement.
Constructor Summary
NodeDisplacementVisitor(int iStartOffset, int iOffsetLength)
          Creates a NodeDisplacementVisitor.
Method Summary
 boolean visit(OASTNode node)
          Performs the recursion's action for a node.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail


protected int _iStartOffset
The starting offset of the displacement.


protected int _iOffsetLength
The length of the displacement.

Constructor Detail


public NodeDisplacementVisitor(int iStartOffset,
                               int iOffsetLength)
Creates a NodeDisplacementVisitor.

iStartOffset - The location of the displacement.
iOffsetLength - The magnitude of the displacement. May be negative.
Method Detail


public boolean visit(OASTNode node)
Description copied from interface: IOASTNodeVisitor
Performs the recursion's action for a node. The return value indicates whether to process the node's children.

Specified by:
visit in interface IOASTNodeVisitor
node - The node
true to continue and visit node's children, false to prevent them from being processed.

Copyright © 2004-2005 BBN Technologies. All Rights Reserved.