Class EvaluatorBuilder

java.lang.Object
build.buf.protovalidate.internal.evaluator.EvaluatorBuilder

public class EvaluatorBuilder extends Object
A build-through cache of message evaluators keyed off the provided descriptor.
  • Constructor Details

    • EvaluatorBuilder

      public EvaluatorBuilder(org.projectnessie.cel.Env env, boolean disableLazy)
      Constructs a new EvaluatorBuilder.
      Parameters:
      env - The CEL environment for evaluation.
      disableLazy - Determines whether lazy loading of evaluators is disabled.
  • Method Details

    • load

      public Evaluator load(com.google.protobuf.Descriptors.Descriptor desc) throws CompilationException
      Returns a pre-cached Evaluator for the given descriptor or, if the descriptor is unknown, returns an evaluator that always throws a CompilationException.
      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.