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 Summary

    Modifier and Type
    Method
    Description
    void
    Releases all resources held by this evaluator.
    evaluate(org.pkl.core.ModuleSource moduleSource)
    Evaluates the given module source into a Config tree.
    Returns the underlying value mapper of this evaluator.
    Shorthand for ConfigEvaluatorBuilder.preconfigured().build().
    Returns a new config evaluator with the same underlying evaluator and the given value mapper.
  • 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.
    • 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