Enum Class RNCAssignType

java.lang.Object
java.lang.Enum<RNCAssignType>
org.eclipse.lemminx.extensions.relaxng.grammar.rnc.RNCAssignType
All Implemented Interfaces:
Serializable, Comparable<RNCAssignType>, Constable

public enum RNCAssignType extends Enum<RNCAssignType>
The type of assignment operator used in an RNC define or start declaration.

RNC supports three assignment operators that control how a pattern is combined with an existing definition of the same name:

  • = — simple assignment (replaces any previous definition)
  • |= — choice combination (adds alternatives via |)
  • &= — interleave combination (adds interleaved content via &)

Use case: used by RNCDefine and RNCStart to record which operator appeared after the name, so code lens and diagnostics can reason about whether a define is being overridden or extended.

Example RNC:

 root = element root { text }       → ASSIGN
 root |= element alt-root { text }  → CHOICE
 root &= attribute id { text }  → INTERLEAVE
 
  • Enum Constant Details

    • ASSIGN

      public static final RNCAssignType ASSIGN
      Simple assignment (=). Example: start = root.
    • CHOICE

      public static final RNCAssignType CHOICE
      Choice combination (|=). Example: content |= element p { text }.
    • INTERLEAVE

      public static final RNCAssignType INTERLEAVE
      Interleave combination (&=). Example: content &= attribute id { text }.
  • Method Details

    • values

      public static RNCAssignType[] 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 RNCAssignType 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