org.basex.query.util
Class ASTVisitor

java.lang.Object
  extended by org.basex.query.util.ASTVisitor

public abstract class ASTVisitor
extends java.lang.Object

A visitor for all sub-expressions in an Expr. All methods return a boolean which signals if the tree walk should be continued.

Author:
Leo Woerteler

Constructor Summary
ASTVisitor()
           
 
Method Summary
 boolean declared(Var count)
          Notifies the visitor of a variable declaration.
 void enterFocus()
          Notifies the visitor of an expression entering a focus.
 void exitFocus()
          Notifies the visitor of an expression leaving a focus.
 boolean funcCall(StaticFuncCall call)
          Notifies the visitor of a function call.
 boolean funcItem(FuncItem func)
          Notifies the visitor of a function item.
 boolean inlineFunc(Scope sub)
          Notifies the visitor of a sub-scope.
 boolean lock(java.lang.String db)
          Notifies the visitor of a database lock.
 boolean staticVar(StaticVar var)
          Notifies the visitor of a reference t oa static variable.
 boolean used(VarRef ref)
          Notifies the visitor of a variable reference.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ASTVisitor

public ASTVisitor()
Method Detail

declared

public boolean declared(Var count)
Notifies the visitor of a variable declaration.

Parameters:
count - declared variable
Returns:
if more expressions should be visited

used

public boolean used(VarRef ref)
Notifies the visitor of a variable reference.

Parameters:
ref - used variable
Returns:
if more expressions should be visited

staticVar

public boolean staticVar(StaticVar var)
Notifies the visitor of a reference t oa static variable.

Parameters:
var - static variable
Returns:
if more expressions should be visited

inlineFunc

public boolean inlineFunc(Scope sub)
Notifies the visitor of a sub-scope.

Parameters:
sub - scope
Returns:
if more expressions should be visited

funcCall

public boolean funcCall(StaticFuncCall call)
Notifies the visitor of a function call.

Parameters:
call - function call
Returns:
if more expressions should be visited

funcItem

public boolean funcItem(FuncItem func)
Notifies the visitor of a function item.

Parameters:
func - the function item
Returns:
if more expressions should be visited

lock

public boolean lock(java.lang.String db)
Notifies the visitor of a database lock.

Parameters:
db - database to be locked
Returns:
if more expressions should be visited

enterFocus

public void enterFocus()
Notifies the visitor of an expression entering a focus.


exitFocus

public void exitFocus()
Notifies the visitor of an expression leaving a focus.