public class IterableCode extends DefaultCode implements Iteration
appended, binding, df, mustache, name, oh, returnThis, tc, type
Constructor and Description |
---|
IterableCode(TemplateContext tc,
DefaultMustacheFactory df,
Mustache mustache,
String variable) |
IterableCode(TemplateContext tc,
DefaultMustacheFactory df,
Mustache mustache,
String variable,
String type) |
Modifier and Type | Method and Description |
---|---|
Writer |
execute(Writer writer,
List<Object> scopes)
The default behavior is to run the codes and append the captured text.
|
protected Writer |
execute(Writer writer,
Object resolve,
List<Object> scopes) |
protected Writer |
handle(Writer writer,
Object resolved,
List<Object> scopes) |
protected Writer |
handleCallable(Writer writer,
Callable callable,
List<Object> scopes) |
protected Writer |
handleFunction(Writer writer,
Function function,
List<Object> scopes) |
Node |
invert(Node node,
String text,
AtomicInteger position) |
Writer |
next(Writer writer,
Object next,
List<Object> scopes) |
protected Writer |
writeTemplate(Writer writer,
String templateText,
List<Object> scopes) |
addScope, append, appendText, clone, clone, filterText, get, getCodes, getName, identity, init, matchAppended, run, runIdentity, setCodes, tag
public IterableCode(TemplateContext tc, DefaultMustacheFactory df, Mustache mustache, String variable, String type)
public IterableCode(TemplateContext tc, DefaultMustacheFactory df, Mustache mustache, String variable)
public Writer execute(Writer writer, List<Object> scopes)
DefaultCode
execute
in interface Code
execute
in class DefaultCode
writer
- The writer to write the output toscopes
- The scopes to evaluate the embedded names against.protected Writer handleCallable(Writer writer, Callable callable, List<Object> scopes)
protected Writer handleFunction(Writer writer, Function function, List<Object> scopes)
protected Writer writeTemplate(Writer writer, String templateText, List<Object> scopes)
public Node invert(Node node, String text, AtomicInteger position)
invert
in interface Code
invert
in class DefaultCode
Copyright © 2018. All rights reserved.