org.eigenbase.util
Class Util.BacktrackVisitor<R>

java.lang.Object
  extended by org.eigenbase.sql.util.SqlBasicVisitor<R>
      extended by org.eigenbase.util.Util.BacktrackVisitor<R>
All Implemented Interfaces:
SqlVisitor<R>
Enclosing class:
Util

private static class Util.BacktrackVisitor<R>
extends SqlBasicVisitor<R>


Nested Class Summary
 
Nested classes/interfaces inherited from class org.eigenbase.sql.util.SqlBasicVisitor
SqlBasicVisitor.ArgHandler<R>, SqlBasicVisitor.ArgHandlerImpl<R>
 
Field Summary
protected  int currentOffset
          Only valid if currentParrent is a SqlCall or SqlNodeList Describes the offset within the parent
protected  SqlNode currentParent
          Used to keep track of the current SqlNode parent of a visiting node.
 
Constructor Summary
private Util.BacktrackVisitor()
           
 
Method Summary
 Integer getCurrentOffset()
           
 SqlNode getCurrentParent()
           
 R visit(SqlCall call)
          Visits a call to a SqlOperator.
 R visit(SqlNodeList nodeList)
          Visits a list of SqlNode objects.
 
Methods inherited from class org.eigenbase.sql.util.SqlBasicVisitor
visit, visit, visit, visit, visit
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

currentParent

protected SqlNode currentParent
Used to keep track of the current SqlNode parent of a visiting node. A value of null mean no parent. NOTE: In case of extending SqlBasicVisitor, remember that parent value might not be set depending on if and how visit(SqlCall) and visit(SqlNodeList) is implemented.


currentOffset

protected int currentOffset
Only valid if currentParrent is a SqlCall or SqlNodeList Describes the offset within the parent

Constructor Detail

Util.BacktrackVisitor

private Util.BacktrackVisitor()
Method Detail

getCurrentParent

public SqlNode getCurrentParent()

getCurrentOffset

public Integer getCurrentOffset()

visit

public R visit(SqlNodeList nodeList)
Description copied from interface: SqlVisitor
Visits a list of SqlNode objects.

Specified by:
visit in interface SqlVisitor<R>
Overrides:
visit in class SqlBasicVisitor<R>
Parameters:
nodeList - list of nodes
See Also:
SqlNodeList.accept(SqlVisitor)

visit

public R visit(SqlCall call)
Description copied from interface: SqlVisitor
Visits a call to a SqlOperator.

Specified by:
visit in interface SqlVisitor<R>
Overrides:
visit in class SqlBasicVisitor<R>
Parameters:
call - Call
See Also:
SqlCall.accept(SqlVisitor)