Class ThisExpression


public class ThisExpression extends Expression
Simple or qualified "this" AST node type.
 ThisExpression:
     [ ClassName . ] this
 

See FieldAccess for guidelines on handling other expressions that resemble qualified names.

Since:
2.0
See Also:
Restriction:
This class is not intended to be instantiated by clients.
  • Field Details

    • QUALIFIER_PROPERTY

      public static final ChildPropertyDescriptor QUALIFIER_PROPERTY
      The "qualifier" structural property of this node type (child type: Name).
      Since:
      3.0
  • Method Details

    • propertyDescriptors

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

      public Name getQualifier()
      Returns the qualifier of this "this" expression, or null if there is none.
      Returns:
      the qualifier name node, or null if there is none
    • setQualifier

      public void setQualifier(Name name)
      Sets or clears the qualifier of this "this" expression.
      Parameters:
      name - the qualifier name node, or null if there is none
      Throws:
      IllegalArgumentException - if:
      • the node belongs to a different AST
      • the node already has a parent