Klasse TypePattern


public class TypePattern extends Pattern
TypePattern pattern AST node type.
 TypePattern:
      SingleVariableDeclaration
 
Seit:
3.27
  • Felddetails

  • 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)
    • patternVariables

      public List<SingleVariableDeclaration> patternVariables()
    • setPatternVariable

      public void setPatternVariable(SingleVariableDeclaration patternVariable)
      Sets the pattern variable.
      Parameter:
      patternVariable - 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
    • getPatternVariable

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