Class InstanceofExpression


  • public class InstanceofExpression
    extends Expression
    Instanceof expression AST node type.
     InstanceofExpression:
        Expression instanceof Type
     
    Since:
    2.0
    Restriction:
    This class is not intended to be instantiated by clients.
    • Field Detail

      • LEFT_OPERAND_PROPERTY

        public static final ChildPropertyDescriptor LEFT_OPERAND_PROPERTY
        The "leftOperand" structural property of this node type (child type: Expression).
        Since:
        3.0
      • RIGHT_OPERAND_PROPERTY

        public static final ChildPropertyDescriptor RIGHT_OPERAND_PROPERTY
        The "rightOperand" structural property of this node type (child type: Type).
        Since:
        3.0
    • Method Detail

      • 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
      • getLeftOperand

        public Expression getLeftOperand()
        Returns the left operand of this instanceof expression.
        Returns:
        the left operand node
      • setLeftOperand

        public void setLeftOperand​(Expression expression)
        Sets the left operand of this instanceof expression.
        Parameters:
        expression - the left operand node
        Throws:
        IllegalArgumentException - if:
        • the node belongs to a different AST
        • the node already has a parent
        • a cycle in would be created
      • getRightOperand

        public Type getRightOperand()
        Returns the right operand of this instanceof expression.
        Returns:
        the right operand node
      • setRightOperand

        public void setRightOperand​(Type referenceType)
        Sets the right operand of this instanceof expression.
        Parameters:
        referenceType - the right operand node
        Throws:
        IllegalArgumentException - if:
        • the node belongs to a different AST
        • the node already has a parent
        • a cycle in would be created