Class StaticVar

  • All Implemented Interfaces:
    Scope

    public final class StaticVar
    extends StaticDecl
    Static variable to which an expression can be assigned.
    Author:
    BaseX Team 2005-23, BSD License, Leo Woerteler
    • Field Detail

      • external

        public final boolean external
        Indicates if this variable can be bound from outside the query.
    • Method Detail

      • compile

        public Expr compile​(CompileContext cc)
                     throws QueryException
        Description copied from interface: Scope
        Compiles the expression contained in this scope.
        Parameters:
        cc - compilation context
        Returns:
        compiled expression, or null if not required
        Throws:
        QueryException - compilation errors
      • visit

        public boolean visit​(ASTVisitor visitor)
        Description copied from interface: Scope
        Traverses this scope with the given ASTVisitor.
        Parameters:
        visitor - visitor
        Returns:
        continue flag
      • id

        public byte[] id()
        Description copied from class: StaticDecl
        Returns a unique identifier for this declaration.
        Specified by:
        id in class StaticDecl
        Returns:
        a byte sequence that uniquely identifies this declaration
      • description

        public String description()
        Description copied from class: ExprInfo
        Returns a string description of the expression. This method is only called by error messages. Contrary to the ExprInfo.toString() method, arguments are not included in the output.
        Overrides:
        description in class ExprInfo
        Returns:
        result of check
      • toXml

        public void toXml​(QueryPlan plan)
        Description copied from class: ExprInfo
        Creates a query plan.
        Specified by:
        toXml in class ExprInfo
        Parameters:
        plan - expression plan
      • toString

        public void toString​(QueryString qs)
        Description copied from class: ExprInfo
        Creates a query string.
        Specified by:
        toString in class ExprInfo
        Parameters:
        qs - query string builder