Class PrefixExpression


  • public class PrefixExpression
    extends Expression
    Prefix expression AST node type.
     PrefixExpression:
        PrefixOperator Expression
     
    Since:
    2.0
    Restriction:
    This class is not intended to be instantiated by clients.
    • Method Detail

      • propertyDescriptors

        public static java.util.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 PrefixExpression.Operator getOperator()
        Returns the operator of this prefix expression.
        Returns:
        the operator
      • setOperator

        public void setOperator​(PrefixExpression.Operator operator)
        Sets the operator of this prefix expression.
        Parameters:
        operator - the operator
        Throws:
        java.lang.IllegalArgumentException - if the argument is incorrect
      • getOperand

        public Expression getOperand()
        Returns the operand of this prefix expression.
        Returns:
        the operand expression node
      • setOperand

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