Interface ConfigEvaluator

  • All Superinterfaces:
    java.lang.AutoCloseable

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

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

    • Method Detail

      • 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 java.lang.AutoCloseable