Class Assignment


public class Assignment extends Expression
Assignment expression AST node type.
 Assignment:
    Expression AssignmentOperator Expression
 
Since:
2.0
Restriction:
This class is not intended to be instantiated by clients.
  • Field Details

    • LEFT_HAND_SIDE_PROPERTY

      public static final ChildPropertyDescriptor LEFT_HAND_SIDE_PROPERTY
      The "leftHandSide" structural property of this node type (child type: Expression).
      Since:
      3.0
    • OPERATOR_PROPERTY

      public static final SimplePropertyDescriptor OPERATOR_PROPERTY
      The "operator" structural property of this node type (type: Assignment.Operator).
      Since:
      3.0
    • RIGHT_HAND_SIDE_PROPERTY

      public static final ChildPropertyDescriptor RIGHT_HAND_SIDE_PROPERTY
      The "rightHandSide" structural property of this node type (child type: Expression).
      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
    • getOperator

      public Assignment.Operator getOperator()
      Returns the operator of this assignment expression.
      Returns:
      the assignment operator
    • setOperator

      public void setOperator(Assignment.Operator assignmentOperator)
      Sets the operator of this assignment expression.
      Parameters:
      assignmentOperator - the assignment operator
      Throws:
      IllegalArgumentException - if the argument is incorrect
    • getLeftHandSide

      public Expression getLeftHandSide()
      Returns the left hand side of this assignment expression.
      Returns:
      the left hand side node
    • setLeftHandSide

      public void setLeftHandSide(Expression expression)
      Sets the left hand side of this assignment expression.
      Parameters:
      expression - the left hand side node
      Throws:
      IllegalArgumentException - if:
      • the node belongs to a different AST
      • the node already has a parent
      • a cycle in would be created
    • getRightHandSide

      public Expression getRightHandSide()
      Returns the right hand side of this assignment expression.
      Returns:
      the right hand side node
    • setRightHandSide

      public void setRightHandSide(Expression expression)
      Sets the right hand side of this assignment expression.
      Parameters:
      expression - the right hand side node
      Throws:
      IllegalArgumentException - if:
      • the node belongs to a different AST
      • the node already has a parent
      • a cycle in would be created