- java.lang.Object
-
- com.samskivert.mustache.Mustache
-
public class Mustache extends Object
Provides Mustache templating services.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!"
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceMustache.CollectorHandles interpreting objects as collections.static classMustache.CompilerCompiles templates into executable form.static interfaceMustache.CustomContextProvides a means to implement custom logic for variable lookup.static interfaceMustache.EscaperHandles escaping characters in substituted text.static interfaceMustache.FormatterHandles converting objects to strings when rendering templates.static interfaceMustache.InvertibleLambdaHandles lambdas that are also invoked for inverse sections..static interfaceMustache.LambdaHandles lambdas.static interfaceMustache.TemplateLoaderHandles loading partial templates.static interfaceMustache.VariableFetcherReads variables from context objects.static interfaceMustache.VisitorUsed to visit the tags in a template without executing it.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Mustache.Compilercompiler()Returns a compiler that escapes HTML by default and does not use standards mode.
-
-
-
Method Detail
-
compiler
public static Mustache.Compiler compiler()
Returns a compiler that escapes HTML by default and does not use standards mode.
-
-