Class ASTVisitor

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

public abstract class ASTVisitor extends 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:
BaseX Team 2005-21, BSD License, Leo Woerteler
  • Constructor Details

    • ASTVisitor

      public ASTVisitor()
  • Method Details

    • declared

      public boolean declared(Var var)
      Notifies the visitor of a variable declaration.
      Parameters:
      var - declared variable
      Returns:
      if more expressions should be visited (true by default)
    • used

      public boolean used(VarRef ref)
      Notifies the visitor of a variable reference.
      Parameters:
      ref - used variable
      Returns:
      if more expressions should be visited (true by default)
    • staticVar

      public boolean staticVar(StaticVar var)
      Notifies the visitor of a reference to a static variable.
      Parameters:
      var - static variable
      Returns:
      if more expressions should be visited (true by default)
    • inlineFunc

      public boolean inlineFunc(Scope scope)
      Notifies the visitor of a sub-scope.
      Parameters:
      scope - sub scope
      Returns:
      if more expressions should be visited (true by default)
    • staticFuncCall

      public boolean staticFuncCall(StaticFuncCall call)
      Notifies the visitor of a static function call.
      Parameters:
      call - function call
      Returns:
      if more expressions should be visited (true by default)
    • dynFuncCall

      public boolean dynFuncCall(DynFuncCall call)
      Notifies the visitor of a dynamic function call.
      Parameters:
      call - function call
      Returns:
      if more expressions should be visited (true by default)
    • 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 (true by default)
    • lock

      public boolean lock(String lock, boolean update)
      Notifies the visitor of a database lock. Overwritten by MainModule. Returns false if the lock is not known statically.
      Parameters:
      lock - lock to be added (null if unknown)
      update - updating flag
      Returns:
      if more expressions should be visited (true by default)
    • enterFocus

      public void enterFocus()
      Notifies the visitor of an expression entering a focus. Overwritten by MainModule.
    • exitFocus

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