public class Template
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
evaluate(java.util.Map<java.lang.String,?> vars)
Evaluate the given template with the given initial set of variables.
|
static Template |
parseFrom(java.io.Reader reader)
Parse a VTL template from the given
Reader. |
public static Template parseFrom(java.io.Reader reader) throws java.io.IOException
Reader.java.io.IOExceptionpublic java.lang.String evaluate(java.util.Map<java.lang.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 © 2017 Google, Inc.. All Rights Reserved.