@Internal public class Template extends Object implements Mustache
| Constructor and Description |
|---|
Template(Long generatedId,
String name,
MustacheEngine engine) |
| Modifier and Type | Method and Description |
|---|---|
MustacheEngine |
getEngine() |
Long |
getGeneratedId()
The id must be unique for the given component type and
MustacheEngine instance. |
String |
getName()
A name is used to locate the template contents by means of
TemplateLocator. |
RootSegment |
getRootSegment() |
void |
render(Appendable appendable,
Object data)
Render the template.
|
String |
render(Object data)
Render the template.
|
String |
toString() |
public Template(Long generatedId, String name, MustacheEngine engine)
generatedId - name - engine - public Long getGeneratedId()
IdentifiedMustacheEngine instance.getGeneratedId in interface Identifiedpublic String getName()
MustacheTemplateLocator. It's sometimes
referenced as an identifier provided by the user. In most cases the name
represents a full (possibly virtual) path of the template.
Note that it's possible to have more than one template with the same name
for a MustacheEngine instance, due to existence
of
MustacheEngine.compileMustache(String, String).public String render(Object data)
Mustachepublic void render(Appendable appendable, Object data)
Mustachepublic RootSegment getRootSegment()
public MustacheEngine getEngine()
Copyright © 2015. All rights reserved.