public class Mustache extends Object
Basic usage:
String source = "Hello {{arg}}!";
Template tmpl = Mustache.compiler().compile(source);
Map<String, Object> context = new HashMap<String, Object>();
context.put("arg", "world");
tmpl.execute(context); // returns "Hello world!"
Modifier and Type | Class and Description |
---|---|
static interface |
Mustache.Collector
Handles interpreting objects as collections.
|
static class |
Mustache.Compiler
Compiles templates into executable form.
|
static interface |
Mustache.Escaper
Handles escaping characters in substituted text.
|
static interface |
Mustache.Formatter
Handles converting objects to strings when rendering templates.
|
static interface |
Mustache.InvertibleLambda
Handles lambdas that are also invoked for inverse sections..
|
static interface |
Mustache.Lambda
Handles lambdas.
|
static interface |
Mustache.TemplateLoader
Handles loading partial templates.
|
static interface |
Mustache.VariableFetcher
Reads variables from context objects.
|
Modifier and Type | Method and Description |
---|---|
static Mustache.Compiler |
compiler()
Returns a compiler that escapes HTML by default and does not use standards mode.
|
public static Mustache.Compiler compiler()
Copyright © 2016. All rights reserved.