Class CodegenLegoBooleanExpression
java.lang.Object
com.espertech.esper.common.internal.epl.expression.codegen.CodegenLegoBooleanExpression
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
codegenBreakIfNotNullAndNotPass
(CodegenBlock block, EPType evaluationType, CodegenExpression expression) Generates code like this (premade expr assumed):static void
codegenContinueIfNotNullAndNotPass
(CodegenBlock block, EPType evaluationType, CodegenExpression expression) Generates code like this (premade expr assumed):static void
codegenContinueIfNullOrNotPass
(CodegenBlock block, EPType evaluationType, CodegenExpression expression) Generates code like this (premade expr assumed):static void
codegenReturnBoolIfNullOrBool
(CodegenBlock block, EPType evaluationType, CodegenExpression expression, boolean earlyExitIfNull, Boolean resultEarlyExit, boolean checkFor, boolean resultIfCheckPasses) Generates code like this (premade expr assumed):static void
codegenReturnValueIfNotNullAndNotPass
(CodegenBlock block, EPType evaluationType, CodegenExpression expression, CodegenExpression value) Generates code like this (premade expr assumed):static void
codegenReturnValueIfNullOrNotPass
(CodegenBlock block, EPType evaluationType, CodegenExpression expression, CodegenExpression value) Generates code like this (premade expr assumed):
-
Constructor Details
-
CodegenLegoBooleanExpression
public CodegenLegoBooleanExpression()
-
-
Method Details
-
codegenReturnBoolIfNullOrBool
public static void codegenReturnBoolIfNullOrBool(CodegenBlock block, EPType evaluationType, CodegenExpression expression, boolean earlyExitIfNull, Boolean resultEarlyExit, boolean checkFor, boolean resultIfCheckPasses) Generates code like this (premade expr assumed):boolean/Boolean result = expression.evaluate(eps, isNewData, context); if (result == null (optional early exit if null) || (!? (Boolean) result)) { return false/true; }
- Parameters:
block
- blockearlyExitIfNull
- indicatorresultEarlyExit
- indicatorcheckFor
- indicatorresultIfCheckPasses
- indicatorevaluationType
- typeexpression
- expr
-
codegenReturnValueIfNotNullAndNotPass
public static void codegenReturnValueIfNotNullAndNotPass(CodegenBlock block, EPType evaluationType, CodegenExpression expression, CodegenExpression value) Generates code like this (premade expr assumed):boolean/Boolean result = expression.evaluate(eps, isNewData, context); if (result != null && (!(Boolean) result)) { return value; }
- Parameters:
block
- blockevaluationType
- eval typeexpression
- expressionvalue
- value
-
codegenReturnValueIfNullOrNotPass
public static void codegenReturnValueIfNullOrNotPass(CodegenBlock block, EPType evaluationType, CodegenExpression expression, CodegenExpression value) Generates code like this (premade expr assumed):boolean/Boolean result = expression.evaluate(eps, isNewData, context); if (result == null || (!(Boolean) result)) { return value; }
- Parameters:
block
- blockevaluationType
- eval typeexpression
- expressionvalue
- value
-
codegenBreakIfNotNullAndNotPass
public static void codegenBreakIfNotNullAndNotPass(CodegenBlock block, EPType evaluationType, CodegenExpression expression) Generates code like this (premade expr assumed):boolean/Boolean result = expression.evaluate(eps, isNewData, context); if (result == null || (!(Boolean) result)) { break; }
- Parameters:
block
- blockevaluationType
- eval typeexpression
- expression
-
codegenContinueIfNotNullAndNotPass
public static void codegenContinueIfNotNullAndNotPass(CodegenBlock block, EPType evaluationType, CodegenExpression expression) Generates code like this (premade expr assumed):if (pass != null && (!(Boolean) pass)) { continue; }
- Parameters:
block
- blockevaluationType
- eval typeexpression
- expression
-
codegenContinueIfNullOrNotPass
public static void codegenContinueIfNullOrNotPass(CodegenBlock block, EPType evaluationType, CodegenExpression expression) Generates code like this (premade expr assumed):if (pass == null || (!(Boolean) pass)) { continue; }
- Parameters:
block
- blockevaluationType
- eval typeexpression
- expression
-