Package org.pkl.config.java
Interface ConfigEvaluator
-
- All Superinterfaces:
java.lang.AutoCloseable
public interface ConfigEvaluator extends java.lang.AutoCloseableAn evaluator that returns aConfigtree.Use
ConfigEvaluatorBuilderto create instances of this type, configured according to your needs.
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description voidclose()Releases all resources held by this evaluator.Configevaluate(org.pkl.core.ModuleSource moduleSource)Evaluates the given module source into aConfigtree.ValueMappergetValueMapper()Returns the underlying value mapper of this evaluator.static ConfigEvaluatorpreconfigured()Shorthand forConfigEvaluatorBuilder.preconfigured().build().ConfigEvaluatorsetValueMapper(ValueMapper mapper)Returns a new config evaluator with the same underlying evaluator and the given value mapper.
-
-
-
Method Detail
-
preconfigured
static ConfigEvaluator preconfigured()
Shorthand forConfigEvaluatorBuilder.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 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 interfacejava.lang.AutoCloseable
-
-