Class RelationalOperator
java.lang.Object
io.micronaut.expressions.parser.ast.ExpressionNode
io.micronaut.expressions.parser.ast.operator.binary.RelationalOperator
- Direct Known Subclasses:
GteOperator
,GtOperator
,LteOperator
,LtOperator
@Internal
public abstract sealed class RelationalOperator
extends ExpressionNode
permits GtOperator, GteOperator, LtOperator, LteOperator
Abstract expression AST node for relational operations. Relational operations can
be applied to numeric types or types that are
Comparable
to each other. It
is unclear at AST building stage what kind of relational operation will be performed, so
this node does not directly include bytecode generation logic. At type resolution stage it
instantiates either NumericComparisonOperation
or ComparablesComparisonOperation
and delegates bytecode generation to respective node instance.- Since:
- 4.0.0
- Author:
- Sergey Gavrilov
-
Field Summary
Fields inherited from class io.micronaut.expressions.parser.ast.ExpressionNode
classElement, nodeType
-
Constructor Summary
-
Method Summary
Methods inherited from class io.micronaut.expressions.parser.ast.ExpressionNode
compile, doResolveClassElement, doResolveClassElement, resolveClassElement, resolveClassElement, resolveType, resolveType
-
Field Details
-
leftOperand
-
rightOperand
-
-
Constructor Details
-
RelationalOperator
-
-
Method Details
-
intComparisonOpcode
-
nonIntComparisonOpcode
-
doResolveType
Description copied from class:ExpressionNode
Resolves expression AST node type.- Specified by:
doResolveType
in classExpressionNode
- Parameters:
ctx
- expression compilation context- Returns:
- resolved type
-
generateBytecode
Description copied from class:ExpressionNode
Generates bytecode for this AST node.- Specified by:
generateBytecode
in classExpressionNode
- Parameters:
ctx
- expression compilation context
-