Package org.basex.query.util
Class ASTVisitor
java.lang.Object
org.basex.query.util.ASTVisitor
A visitor for all sub-expressions in an
Expr. All methods return a
boolean which signals if the tree walk should be continued.- Author:
- BaseX Team 2005-21, BSD License, Leo Woerteler
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanNotifies the visitor of a variable declaration.booleandynFuncCall(DynFuncCall call) Notifies the visitor of a dynamic function call.voidNotifies the visitor of an expression entering a focus.voidNotifies the visitor of an expression leaving a focus.booleanNotifies the visitor of a function item.booleaninlineFunc(Scope scope) Notifies the visitor of a sub-scope.booleanNotifies the visitor of a database lock.booleanstaticFuncCall(StaticFuncCall call) Notifies the visitor of a static function call.booleanNotifies the visitor of a reference to a static variable.booleanNotifies the visitor of a variable reference.
-
Constructor Details
-
ASTVisitor
public ASTVisitor()
-
-
Method Details
-
declared
Notifies the visitor of a variable declaration.- Parameters:
var- declared variable- Returns:
- if more expressions should be visited (
trueby default)
-
used
Notifies the visitor of a variable reference.- Parameters:
ref- used variable- Returns:
- if more expressions should be visited (
trueby default)
-
staticVar
Notifies the visitor of a reference to a static variable.- Parameters:
var- static variable- Returns:
- if more expressions should be visited (
trueby default)
-
inlineFunc
Notifies the visitor of a sub-scope.- Parameters:
scope- sub scope- Returns:
- if more expressions should be visited (
trueby default)
-
staticFuncCall
Notifies the visitor of a static function call.- Parameters:
call- function call- Returns:
- if more expressions should be visited (
trueby default)
-
dynFuncCall
Notifies the visitor of a dynamic function call.- Parameters:
call- function call- Returns:
- if more expressions should be visited (
trueby default)
-
funcItem
Notifies the visitor of a function item.- Parameters:
func- the function item- Returns:
- if more expressions should be visited (
trueby default)
-
lock
Notifies the visitor of a database lock. Overwritten byMainModule. Returnsfalseif the lock is not known statically.- Parameters:
lock- lock to be added (nullif unknown)update- updating flag- Returns:
- if more expressions should be visited (
trueby default)
-
enterFocus
public void enterFocus()Notifies the visitor of an expression entering a focus. Overwritten byMainModule. -
exitFocus
public void exitFocus()Notifies the visitor of an expression leaving a focus. Overwritten byMainModule.
-