Package codeanalysis.binding
Class BoundBinaryOperator
java.lang.Object
codeanalysis.binding.BoundBinaryOperator
The BoundBinaryOperator class represents a binary operator used in binding expressions.
It encapsulates information about the syntax type, operator type, left operand type, right operand type and result type of the operator.
The class provides methods to bind a binary operator based on the syntax type and operands type, and to retrieve the properties of an operator.
- Version:
- 1.0
- Author:
- Siyabend Urun
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic BoundBinaryOperatorbind(SyntaxType syntaxType, Class<?> leftType, Class<?> rightType) Binds a binary operator based on the syntax type, left type, and right type.Class<?>Gets the left operand type.Class<?>Gets the result type of the operation.Class<?>Gets the right operand type.Gets the syntax type associated with the operator.getType()Gets the operator type.
-
Method Details
-
bind
public static BoundBinaryOperator bind(SyntaxType syntaxType, Class<?> leftType, Class<?> rightType) Binds a binary operator based on the syntax type, left type, and right type.- Parameters:
syntaxType- The syntax type of the operator.leftType- The left operand type.rightType- The right operand type.- Returns:
- The bound binary operator, or
nullif no matching operator is found.
-
getSyntaxType
Gets the syntax type associated with the operator.- Returns:
- The syntax type.
-
getType
Gets the operator type.- Returns:
- The operator type.
-
getLeftType
Gets the left operand type.- Returns:
- The left operand type.
-
getRightType
Gets the right operand type.- Returns:
- The right operand type.
-
getResultType
Gets the result type of the operation.- Returns:
- The result type.
-