Class AnnotatedUnaryOperator

  • All Implemented Interfaces:
    AnnotatedOperator

    public final class AnnotatedUnaryOperator
    extends java.lang.Object
    implements AnnotatedOperator
    The AnnotatedUnaryOperator class is used to store information about annotated unary operators declared during compilation.
    Since:
    1.0
    • Constructor Detail

      • AnnotatedUnaryOperator

        public AnnotatedUnaryOperator​(TokenType tokenType,
                                      OperatorType operatorType,
                                      ObjectType operandObjectType,
                                      ObjectType resultObjectType)
        Constructs an AnnotatedUnaryOperator object, initialised with the types of the expressions contents.
        Parameters:
        tokenType - The operator TokenType
        operatorType - The operator OperatorType
        operandObjectType - The operand ObjectType
        resultObjectType - The result ObjectType
      • AnnotatedUnaryOperator

        public AnnotatedUnaryOperator​(TokenType tokenType,
                                      OperatorType operatorType,
                                      ObjectType objectType)
        Constructs an AnnotatedUnaryOperator object, initialised with the types of the expressions contents.

        The operandObjectType and resultObjectType fields are assigned the value of the objectType parameter.

        Parameters:
        tokenType - The operator TokenType
        operatorType - The operator OperatorType
        objectType - The operand and result ObjectType