Class AnnotatedBinaryOperator

  • All Implemented Interfaces:
    AnnotatedOperator

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

      • AnnotatedBinaryOperator

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

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

        The leftObjectType and rightObjectType fields are assigned the value of the operandObjectType parameter.

        Parameters:
        tokenType - The operator TokenType
        operatorType - The operator OperatorType
        operandObjectType - The left and right operand ObjectType
        resultObjectType - The result ObjectType
      • AnnotatedBinaryOperator

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

        The leftObjectType, rightObjectType, and resultObjectType fields are assigned the value of the objectType parameter.

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