public interface Options extends HelperDefinition
| Modifier and Type | Interface and Description |
|---|---|
static interface |
Options.HelperExecutable
A helper task to be executed asynchronously.
|
HelperDefinition.ValuePlaceholder| Modifier and Type | Method and Description |
|---|---|
void |
append(CharSequence sequence)
Append the given sequence to the rendered template.
|
default Options |
appendAnd(CharSequence sequence)
Fluent version of
append(CharSequence). |
void |
executeAsync(Options.HelperExecutable executable)
Executes the given
Options.HelperExecutable asynchronously. |
default Options |
executeAsyncAnd(Options.HelperExecutable executable)
Fluent version of
executeAsync(HelperExecutable). |
void |
fn()
Proceed with template execution, i.e. execute the block.
|
void |
fn(Appendable appendable)
Proceed with execution, i.e. execute the block.
|
default Options |
fnAnd()
Fluent version of
fn(). |
default Options |
fnAnd(Appendable appendable)
Fluent version of
fn(Appendable). |
Appendable |
getAppendable()
In most cases it's better to use the convenient method
append(CharSequence) instead. |
default Options |
getAppendableAnd(Consumer<Appendable> consumer)
Fluent version of
getAppendable(). |
HelperDefinition |
getOriginalDefinition() |
Object |
getValue(String key)
The key is first processed by the
KeySplitter and then processed by
the resolver chain. |
default Options |
getValueAnd(String key,
Consumer<Object> consumer)
Fluent version of
getValue(String). |
void |
partial(String name)
Render the template with the current context and append the result to the
rendered template.
|
void |
partial(String templateId,
Appendable appendable)
Render the template with the current context and append the result to the
given appendable.
|
default Options |
partialAnd(String name)
Fluent version of
partial(String). |
default Options |
partialAnd(String templateId,
Appendable appendable)
Fluent version of
partial(String, Appendable). |
Object |
peek()
Returns the object at the top of the context stack without removing it.
|
default Options |
peekAnd(Consumer<Object> consumer)
Fluent version of
peek(). |
Object |
pop()
Removes the object at the top of the context stack and returns that object.
|
default Options |
popAnd(Consumer<Object> consumer)
Fluent version of
pop(). |
void |
push(Object contextObject)
Push the specified object on the context stack.
|
default Options |
pushAnd(Object contextObject)
Fluent version of
push(Object). |
String |
source(String name) |
default Options |
sourceAnd(String name,
Consumer<String> consumer)
Fluent version of
source(String). |
getContentLiteralBlock, getHash, getParameter, getParameters, getTagInfovoid append(CharSequence sequence)
sequence - void fn()
void partial(String name)
name - MustacheException - If there's no such templateMustache.getName()String source(String name)
name - MustacheException - If there's no such templateMustache.getName()void push(Object contextObject)
contextObject - Object pop()
MustacheException - In case of a helper tries to pop a context object it did not push
previouslyObject peek()
Appendable getAppendable()
append(CharSequence) instead.Mustache.render(Appendable, Object)void fn(Appendable appendable)
appendable - The appendable to append the rendered block toObject getValue(String key)
KeySplitter and then processed by
the resolver chain.key - null if
no such value existsKeySplittervoid partial(String templateId, Appendable appendable)
templateId - MustacheException - If there's no such templatevoid executeAsync(Options.HelperExecutable executable)
Options.HelperExecutable asynchronously.executable - HelperDefinition getOriginalDefinition()
default Options appendAnd(CharSequence sequence)
append(CharSequence).sequence - default Options fnAnd(Appendable appendable)
fn(Appendable).appendable - default Options partialAnd(String name)
partial(String).name - default Options partialAnd(String templateId, Appendable appendable)
partial(String, Appendable).templateId - appendable - default Options sourceAnd(String name, Consumer<String> consumer)
source(String).name - consumer - default Options pushAnd(Object contextObject)
push(Object).contextObject - default Options popAnd(Consumer<Object> consumer)
pop().consumer - default Options peekAnd(Consumer<Object> consumer)
peek().consumer - default Options getAppendableAnd(Consumer<Appendable> consumer)
getAppendable().consumer - default Options getValueAnd(String key, Consumer<Object> consumer)
getValue(String).key - consumer - default Options executeAsyncAnd(Options.HelperExecutable executable)
executeAsync(HelperExecutable).executable - Copyright © 2020. All rights reserved.