Klasse RecordPattern


public class RecordPattern extends Pattern
TypePattern pattern AST node type.
 RecordPattern:
      PatternUngültige Eingabe: "<"PatternUngültige Eingabe: "<"Patterns....>> Type SimpleName
 
Seit:
3.31
  • Felddetails

    • PATTERNS_PROPERTY

      public static final ChildListPropertyDescriptor PATTERNS_PROPERTY
      The "patterns" structural property of this node type (child type: Pattern).
    • PATTERN_TYPE_PROPERTY

      public static final ChildPropertyDescriptor PATTERN_TYPE_PROPERTY
      The "patternType" structural property of this node type (child type: Type).
  • Methodendetails

    • propertyDescriptors

      public static List propertyDescriptors(int apiLevel)
      Returns a list of structural property descriptors for this node type. Clients must not modify the result.
      Parameter:
      apiLevel - the API level; one of the AST.JLS* constants
      Gibt zurück:
      a list of property descriptors (element type: StructuralPropertyDescriptor)
    • propertyDescriptors

      public static List propertyDescriptors(int apiLevel, boolean previewEnabled)
      Returns a list of structural property descriptors for this node type. Clients must not modify the result.
      Parameter:
      apiLevel - the API level; one of the AST.JLS* constants
      previewEnabled - the previewEnabled flag
      Gibt zurück:
      a list of property descriptors (element type: StructuralPropertyDescriptor)
    • setPatternType

      public void setPatternType(Type patternType)
      Sets the pattern type.
      Parameter:
      patternType - the right operand node
      Löst aus:
      IllegalArgumentException - if:
      • the node belongs to a different AST
      • the node already has a parent
      • a cycle in would be created
      UnsupportedOperationException - if this operation is used other than JLS19
      UnsupportedOperationException - if this expression is used with previewEnabled flag as false
    • getPatternType

      public Type getPatternType()
      Returns the pattern type of Types Pattern.
      Gibt zurück:
      the pattern type
      Löst aus:
      UnsupportedOperationException - if this operation is used other than JLS19
      UnsupportedOperationException - if this expression is used with previewEnabled flag as false
    • patterns

      public List<Pattern> patterns()
      Returns the nested Pattern list.
      Gibt zurück:
      the live list of pattern nodes (element type: Pattern)
      Löst aus:
      UnsupportedOperationException - if this operation is used other than JLS19
      UnsupportedOperationException - if this expression is used with previewEnabled flag as false