Package org.pkl.config.java
Interface ConfigEvaluator
- All Superinterfaces:
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 TypeMethodDescriptionvoidclose()Releases all resources held by this evaluator.evaluate(org.pkl.core.ModuleSource moduleSource) Evaluates the given module source into aConfigtree.Returns the underlying value mapper of this evaluator.static ConfigEvaluatorShorthand forConfigEvaluatorBuilder.preconfigured().build().setValueMapper(ValueMapper mapper) Returns a new config evaluator with the same underlying evaluator and the given value mapper.
-
Method Details
-
preconfigured
Shorthand forConfigEvaluatorBuilder.preconfigured().build(). -
getValueMapper
ValueMapper getValueMapper()Returns the underlying value mapper of this evaluator. -
setValueMapper
Returns a new config evaluator with the same underlying evaluator and the given value mapper. -
evaluate
Evaluates the given module source into aConfigtree. -
close
void close()Releases all resources held by this evaluator. If anevaluatemethod 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
evaluatemethods will throwIllegalStateException. However, objects previously returned byevaluatemethods remain valid.- Specified by:
closein interfaceAutoCloseable
-