public class Template extends Object
Modifier and Type | Method and Description |
---|---|
String |
evaluate(Map<String,?> vars)
Evaluate the given template with the given initial set of variables.
|
static Template |
parseFrom(Reader reader)
Parse a VTL template from the given
Reader . |
public static Template parseFrom(Reader reader) throws IOException
Reader
.IOException
public String evaluate(Map<String,?> vars)
vars
- a map where the keys are variable names and the values are the corresponding
variable values. For example, if "x"
maps to 23, then $x
in the template
will expand to 23.Copyright © 2019. All rights reserved.