Class MathOperator
java.lang.Object
io.micronaut.expressions.parser.ast.ExpressionNode
io.micronaut.expressions.parser.ast.operator.binary.BinaryOperator
io.micronaut.expressions.parser.ast.operator.binary.MathOperator
Abstract expression AST node for binary math operations
on primitive types.
- Since:
- 4.0.0
- Author:
- Sergey Gavrilov
-
Field Summary
Fields inherited from class io.micronaut.expressions.parser.ast.operator.binary.BinaryOperator
leftOperand, rightOperand
Fields inherited from class io.micronaut.expressions.parser.ast.ExpressionNode
classElement, nodeType
-
Constructor Summary
ConstructorDescriptionMathOperator
(ExpressionNode leftOperand, ExpressionNode rightOperand, io.micronaut.sourcegen.model.ExpressionDef.MathBinaryOperation.OpType type) -
Method Summary
Modifier and TypeMethodDescriptionio.micronaut.sourcegen.model.ExpressionDef
Generates bytecode for this AST node.protected io.micronaut.sourcegen.model.TypeDef
resolveOperationType
(io.micronaut.sourcegen.model.TypeDef leftOperandType, io.micronaut.sourcegen.model.TypeDef rightOperandType) Methods inherited from class io.micronaut.expressions.parser.ast.operator.binary.BinaryOperator
doResolveType
Methods inherited from class io.micronaut.expressions.parser.ast.ExpressionNode
compile, doResolveClassElement, doResolveClassElement, resolveClassElement, resolveClassElement, resolveType, resolveType
-
Constructor Details
-
MathOperator
public MathOperator(ExpressionNode leftOperand, ExpressionNode rightOperand, io.micronaut.sourcegen.model.ExpressionDef.MathBinaryOperation.OpType type)
-
-
Method Details
-
generateExpression
public io.micronaut.sourcegen.model.ExpressionDef generateExpression(ExpressionCompilationContext ctx) Description copied from class:ExpressionNode
Generates bytecode for this AST node.- Specified by:
generateExpression
in classExpressionNode
- Parameters:
ctx
- expression compilation context- Returns:
- The expression definition
-
resolveOperationType
protected io.micronaut.sourcegen.model.TypeDef resolveOperationType(io.micronaut.sourcegen.model.TypeDef leftOperandType, io.micronaut.sourcegen.model.TypeDef rightOperandType) - Specified by:
resolveOperationType
in classBinaryOperator
-