Class CodegenLegoBooleanExpression

java.lang.Object
com.espertech.esper.common.internal.epl.expression.codegen.CodegenLegoBooleanExpression

public class CodegenLegoBooleanExpression extends Object
  • 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 - block
      earlyExitIfNull - indicator
      resultEarlyExit - indicator
      checkFor - indicator
      resultIfCheckPasses - indicator
      evaluationType - type
      expression - 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 - block
      evaluationType - eval type
      expression - expression
      value - 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 - block
      evaluationType - eval type
      expression - expression
      value - 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 - block
      evaluationType - eval type
      expression - 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 - block
      evaluationType - eval type
      expression - 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 - block
      evaluationType - eval type
      expression - expression