Class CelPrograms
java.lang.Object
build.buf.protovalidate.internal.expression.CelPrograms
- All Implemented Interfaces:
Evaluator
Evaluator that executes a
CompiledProgram.-
Constructor Summary
ConstructorsConstructorDescriptionCelPrograms(List<CompiledProgram> compiledPrograms) Constructs a newCelPrograms. -
Method Summary
Modifier and TypeMethodDescriptionChecks that the provided val is valid.booleanTautology returns true if the evaluator always succeeds.
-
Constructor Details
-
CelPrograms
Constructs a newCelPrograms.- Parameters:
compiledPrograms- The programs to execute.
-
-
Method Details
-
tautology
public boolean tautology()Description copied from interface:EvaluatorTautology returns true if the evaluator always succeeds. -
evaluate
Description copied from interface:EvaluatorChecks that the provided val is valid. Unless failFast is true, evaluation attempts to find allViolationspresent in val instead of returning aValidationResulton the firstViolation.- Specified by:
evaluatein interfaceEvaluator- 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.
-