Enum Class Flag

java.lang.Object
java.lang.Enum<Flag>
org.basex.query.util.Flag
All Implemented Interfaces:
Serializable, Comparable<Flag>, java.lang.constant.Constable

public enum Flag extends Enum<Flag>
Expression properties that influence query compilation.
Author:
BaseX Team 2005-21, BSD License, Christian Gruen
  • Enum Constant Details

    • CNS

      public static final Flag CNS
      Node creation. No relocation of expressions that would change number of node constructions Example: node constructor.
    • CTX

      public static final Flag CTX
      Context dependency. Checked to prevent relocations of expressions to different context. Example: context item (.).
    • NDT

      public static final Flag NDT
      Non-deterministic code. Cannot be relocated, pre-evaluated or optimized away. Examples: random:double(), file:write().
    • POS

      public static final Flag POS
      Positional access. Prevents simple iterative evaluation. Each expression that contains this flag must also contain CTX. Examples: position(), last().
    • UPD

      public static final Flag UPD
      Performs updates. Checked to detect if an expression is updating or not, or if code can be optimized away when using MainOptions.MIXUPDATES. All updating expressions are non-deterministic. Example: delete node.
    • HOF

      public static final Flag HOF
      Function invocation. Used to suppress pre-evaluation of built-in functions with functions arguments. Example: fn:fold-left.
  • Method Details

    • values

      public static Flag[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static Flag valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • remove

      public Flag[] remove(Flag[] flags)
      Removes this flag from the specified array.
      Parameters:
      flags - flags
      Returns:
      new array
    • in

      public boolean in(Flag[] flags)
      Checks this flag is contained in the specified array.
      Parameters:
      flags - flags
      Returns:
      result of check