Package io.github.erdos.stencil.impl
Class NativeEvaluator
- java.lang.Object
-
- io.github.erdos.stencil.impl.NativeEvaluator
-
public final class NativeEvaluator extends java.lang.Object
Default implementation that calls the engine written in Clojure.
-
-
Constructor Summary
Constructors Constructor Description NativeEvaluator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FunctionEvaluator
getFunctionEvaluator()
It can be used to externally add function definitions.EvaluatedDocument
render(PreparedTemplate template, java.util.Map<java.lang.String,PreparedFragment> fragments, TemplateData data)
Evaluates a preprocessed template using the given data.
-
-
-
Method Detail
-
render
public EvaluatedDocument render(PreparedTemplate template, java.util.Map<java.lang.String,PreparedFragment> fragments, TemplateData data)
Evaluates a preprocessed template using the given data.- Parameters:
template
- preprocessed template filedata
- contains template variables- Returns:
- evaluated document ready to save to fs
- Throws:
java.lang.IllegalArgumentException
- when any arg is null
-
getFunctionEvaluator
public FunctionEvaluator getFunctionEvaluator()
It can be used to externally add function definitions.
-
-