Class StaticDecl

All Implemented Interfaces:
Scope
Direct Known Subclasses:
StaticFunc, StaticVar

public abstract class StaticDecl extends StaticScope
Common superclass for static functions and variables.
Author:
BaseX Team 2005-21, BSD License, Leo Woerteler
  • Field Details

    • anns

      public final AnnList anns
      Annotations.
    • name

      public final QNm name
      Name of the declaration.
    • declType

      protected SeqType declType
      Declared type, null if not specified.
    • dontEnter

      protected boolean dontEnter
      Flag that is set during compilation and execution and prevents infinite loops.
  • Constructor Details

    • StaticDecl

      protected StaticDecl(AnnList anns, QNm name, SeqType declType, VarScope vs, String doc, InputInfo info)
      Constructor.
      Parameters:
      anns - annotations
      name - name
      declType - declared return type (can be null)
      vs - variable scope
      doc - xqdoc documentation
      info - input info
  • Method Details

    • id

      public abstract byte[] id()
      Returns a unique identifier for this declaration.
      Returns:
      a byte sequence that uniquely identifies this declaration
    • seqType

      public final SeqType seqType()
      Returns the type of this expression. If no type has been declared in the expression, it is derived from the expression type.
      Returns:
      return type