| Modifier and Type | Class and Description |
|---|---|
class |
AbstractConfigurationAware
Abstract no-op configuration aware component.
|
| Modifier and Type | Interface and Description |
|---|---|
interface |
KeySplitter
This component is responsible for splitting a variable key.
|
interface |
MissingValueHandler
This component handles variable miss during interpolation of a
ValueSegment, aka variable tag. |
| Modifier and Type | Class and Description |
|---|---|
class |
BracketDotKeySplitter
Enables to use bracket notation and literals in
ValueSegment keys. |
class |
DotKeySplitter
A default
KeySplitter implementation which follows the dot notation. |
class |
NoOpMissingValueHandler
By default a variable miss returns an empty string - i.e. no operation.
|
class |
ThrowingExceptionMissingValueHandler
Throws an exception when a variable miss occurs.
|
| Modifier and Type | Interface and Description |
|---|---|
interface |
MustacheListener
Receives notifications about
Mustache processing. |
| Modifier and Type | Class and Description |
|---|---|
class |
AbstractMustacheListener
Abstract no-op mustache listener.
|
| Modifier and Type | Interface and Description |
|---|---|
interface |
LocaleSupport
Locale support.
|
| Modifier and Type | Interface and Description |
|---|---|
interface |
TemplateLocator
Automatically locates the template contents for the given template
identifier.
|
| Modifier and Type | Class and Description |
|---|---|
class |
AbstractTemplateLocator |
class |
ClassPathTemplateLocator
Classpath template locator.
|
class |
FilePathTemplateLocator
Abstract file-based template locator.
|
class |
FileSystemTemplateLocator
Filesystem template locator.
|
class |
MapTemplateLocator
Template locator backed by a
Map. |
class |
PathTemplateLocator<T>
Represents a template locator where the template identifier is a path.
|
| Modifier and Type | Interface and Description |
|---|---|
interface |
Resolver
Value resolver.
|
| Modifier and Type | Class and Description |
|---|---|
class |
AbstractResolver
Abstract resolver.
|
class |
ArrayIndexResolver
Resolve index-based access to arrays.
|
class |
DummyTransformResolver
Unlike
TransformResolver this resolver first returns a dummy context
object - unique marker - and then performs the transformation. |
class |
IndexResolver
Abstract index-based resolver.
|
class |
ListIndexResolver
Resolve index-based access to lists.
|
class |
MapCustomKeyResolver
Abstract resolver for maps with custom key types.
|
class |
MapResolver
Resolves
Map values. |
class |
ReflectionResolver
Reflection-based resolver attempts to find a matching member on the context
object class and its superclasses.
|
class |
ThisResolver |
class |
TransformResolver
This resolver performs some kind of transformation when matched (e.g. formats
the given context object based on the given name).
|
| Modifier and Type | Class and Description |
|---|---|
class |
DateTimeFormatResolver
Basic date and time formatting resolver.
|
class |
LocaleAwareResolver |
class |
NumberFormatResolver
Basic number formatting resolver.
|
class |
ResourceBundleResolver
ResourceBundle resolver. |
| Modifier and Type | Interface and Description |
|---|---|
interface |
TextSupport
Text support.
|
| Modifier and Type | Interface and Description |
|---|---|
interface |
Helper
Handlebars-like helper.
|
| Modifier and Type | Class and Description |
|---|---|
class |
AbstractHelper |
class |
BasicSectionHelper |
class |
BasicValueHelper |
class |
BasicHelper
Basic validating helper.
|
class |
EachHelper
{{#each items}}
{{name}}
{{/each}}
|
class |
IfHelper
{{#if item.active}}
{{item.name}}
{{/if}}
|
class |
IsHelper
Renders the second param if the first param is not falsy, or (optionally,
i.e. if set) the third param.
|
class |
NumberIsEvenHelper
{{isEven iterIndex "evenRow"}}
{{isEven iterIndex "evenRow" "oddRow"}}
{{#isEven iterIndex}}
... |
class |
NumberIsOddHelper
{{isOdd iterIndex "oddRow"}}
{{isOdd iterIndex "oddRow" "evenRow"}}
{{#isOdd iterIndex}}
... |
class |
UnlessHelper
Conditionally renders a block if the first parameter is "falsy".
|
class |
WithHelper
Nested context.
|
| Modifier and Type | Class and Description |
|---|---|
class |
DateTimeFormatHelper
This is an alternative to
DateTimeFormatResolver. |
class |
LocaleAwareValueHelper |
class |
ResourceBundleHelper
First register the helper instance:
MustacheEngineBuilder.newBuilder().registerHelper("msg", new ResourceBundleHelper("msg")).build();
Than use the helper in the template:
{{msg "my.key"}}
The key need not be a string literal:
{{msg foo.key}}
You may also override the default baseName:
{{msg "my.key" baseName="messages"}}
And also use Formatter or MessageFormat:
{{msg "my.key" format="printf"}}
See also ResourceBundleHelper.Format for more info about formats. |
Copyright © 2014. All Rights Reserved.