public class TemplateRenderer extends Object
MessageFormat but in contrast can be shared between threads
because it is immutable. Parameters are denoted by a question mark directly followed by the parameter index.
The following example should illustrate the usage.
new TemplateRenderer("?1 limit ?2")
.start(context)
.addArgument(1)
.addArgument(2)
.build();
| Modifier and Type | Class and Description |
|---|---|
static class |
TemplateRenderer.Context |
| Constructor and Description |
|---|
TemplateRenderer(String template)
Creates a new template renderer from the given template.
|
| Modifier and Type | Method and Description |
|---|---|
TemplateRenderer.Context |
start(FunctionRenderContext context)
Starts a new context for the given FunctionRenderContext for building parameter bindings.
|
public TemplateRenderer(String template)
template - The template on which this renderer is based.public TemplateRenderer.Context start(FunctionRenderContext context)
context - The render context for the functionCopyright © 2016 Blazebit. All Rights Reserved.