Class CelPrograms

java.lang.Object
build.buf.protovalidate.internal.expression.CelPrograms
All Implemented Interfaces:
Evaluator

public class CelPrograms extends Object implements Evaluator
Evaluator that executes a CompiledProgram.
  • Constructor Details

    • CelPrograms

      public CelPrograms(List<CompiledProgram> compiledPrograms)
      Constructs a new CelPrograms.
      Parameters:
      compiledPrograms - The programs to execute.
  • Method Details

    • tautology

      public boolean tautology()
      Description copied from interface: Evaluator
      Tautology returns true if the evaluator always succeeds.
      Specified by:
      tautology in interface Evaluator
      Returns:
      True if the evaluator always succeeds.
    • evaluate

      public ValidationResult evaluate(Value val, boolean failFast) throws ExecutionException
      Description copied from interface: Evaluator
      Checks that the provided val is valid. Unless failFast is true, evaluation attempts to find all Violations present in val instead of returning a ValidationResult on the first Violation.
      Specified by:
      evaluate in interface Evaluator
      Parameters:
      val - The value to validate.
      failFast - If true, validation stops after the first failure.
      Returns:
      The result of validation on the specified value.
      Throws:
      ExecutionException - If evaluation fails to complete.