Interface ConfigEvaluator

All Superinterfaces:
AutoCloseable

public interface ConfigEvaluator extends AutoCloseable
An evaluator that returns a Config tree.

Use ConfigEvaluatorBuilder to create instances of this type, configured according to your needs.

  • Method Details

    • preconfigured

      static ConfigEvaluator preconfigured()
      Shorthand for ConfigEvaluatorBuilder.preconfigured().build().
    • getValueMapper

      ValueMapper getValueMapper()
      Returns the underlying value mapper of this evaluator.
    • setValueMapper

      ConfigEvaluator setValueMapper(ValueMapper mapper)
      Returns a new config evaluator with the same underlying evaluator and the given value mapper.
    • evaluate

      Config evaluate(org.pkl.core.ModuleSource moduleSource)
      Evaluates the given module source into a Config tree.
    • evaluateOutputValue

      Config evaluateOutputValue(org.pkl.core.ModuleSource moduleSource)
      Evaluates the given module's output.value property into a Config tree.
    • evaluateExpression

      Config evaluateExpression(org.pkl.core.ModuleSource moduleSource, String expression)
      Evaluates the Pkl expression represented as expression into a Config tree.
    • close

      void close()
      Releases all resources held by this evaluator. If an evaluate method is currently executing, this method blocks until cancellation of that execution has completed.

      Once an evaluator has been closed, it can no longer be used, and calling evaluate methods will throw IllegalStateException. However, objects previously returned by evaluate methods remain valid.

      Specified by:
      close in interface AutoCloseable