Class EvaluatorBuilder
java.lang.Object
build.buf.protovalidate.internal.evaluator.EvaluatorBuilder
A build-through cache of message evaluators keyed off the provided descriptor.
-
Constructor Summary
ConstructorsConstructorDescriptionEvaluatorBuilder(org.projectnessie.cel.Env env, boolean disableLazy) Constructs a newEvaluatorBuilder. -
Method Summary
Modifier and TypeMethodDescriptionload(com.google.protobuf.Descriptors.Descriptor desc) Returns a pre-cachedEvaluatorfor the given descriptor or, if the descriptor is unknown, returns an evaluator that always throws aCompilationException.
-
Constructor Details
-
EvaluatorBuilder
public EvaluatorBuilder(org.projectnessie.cel.Env env, boolean disableLazy) Constructs a newEvaluatorBuilder.- Parameters:
env- The CEL environment for evaluation.disableLazy- Determines whether lazy loading of evaluators is disabled.
-
-
Method Details
-
load
Returns a pre-cachedEvaluatorfor the given descriptor or, if the descriptor is unknown, returns an evaluator that always throws aCompilationException.- Parameters:
desc- Protobuf descriptor type.- Returns:
- An evaluator for the descriptor type.
- Throws:
CompilationException- If an evaluator can't be created for the specified descriptor.
-