Package com.github.mustachejava.codes
Class IterableCode
- java.lang.Object
-
- com.github.mustachejava.codes.DefaultCode
-
- com.github.mustachejava.codes.IterableCode
-
- Direct Known Subclasses:
NotIterableCode
public class IterableCode extends DefaultCode implements Iteration
-
-
Constructor Summary
Constructors Constructor Description IterableCode(TemplateContext tc, DefaultMustacheFactory df, Mustache mustache, java.lang.String variable)IterableCode(TemplateContext tc, DefaultMustacheFactory df, Mustache mustache, java.lang.String variable, java.lang.String type)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.io.Writerexecute(java.io.Writer writer, java.lang.Object resolve, java.util.List<java.lang.Object> scopes)java.io.Writerexecute(java.io.Writer writer, java.util.List<java.lang.Object> scopes)The default behavior is to run the codes and append the captured text.protected java.io.Writerhandle(java.io.Writer writer, java.lang.Object resolved, java.util.List<java.lang.Object> scopes)protected java.io.WriterhandleCallable(java.io.Writer writer, java.util.concurrent.Callable callable, java.util.List<java.lang.Object> scopes)protected java.io.WriterhandleFunction(java.io.Writer writer, java.util.function.Function function, java.util.List<java.lang.Object> scopes)Nodeinvert(Node node, java.lang.String text, java.util.concurrent.atomic.AtomicInteger position)java.io.Writernext(java.io.Writer writer, java.lang.Object next, java.util.List<java.lang.Object> scopes)protected java.io.WriterwriteTemplate(java.io.Writer writer, java.lang.String templateText, java.util.List<java.lang.Object> scopes)-
Methods inherited from class com.github.mustachejava.codes.DefaultCode
addScope, append, appendText, clone, clone, filterText, get, getCodes, getName, identity, init, matchAppended, run, runIdentity, setCodes, tag
-
-
-
-
Constructor Detail
-
IterableCode
public IterableCode(TemplateContext tc, DefaultMustacheFactory df, Mustache mustache, java.lang.String variable, java.lang.String type)
-
IterableCode
public IterableCode(TemplateContext tc, DefaultMustacheFactory df, Mustache mustache, java.lang.String variable)
-
-
Method Detail
-
execute
public java.io.Writer execute(java.io.Writer writer, java.util.List<java.lang.Object> scopes)Description copied from class:DefaultCodeThe default behavior is to run the codes and append the captured text.- Specified by:
executein interfaceCode- Overrides:
executein classDefaultCode- Parameters:
writer- The writer to write the output toscopes- The scopes to evaluate the embedded names against.
-
handle
protected java.io.Writer handle(java.io.Writer writer, java.lang.Object resolved, java.util.List<java.lang.Object> scopes)
-
handleCallable
protected java.io.Writer handleCallable(java.io.Writer writer, java.util.concurrent.Callable callable, java.util.List<java.lang.Object> scopes)
-
handleFunction
protected java.io.Writer handleFunction(java.io.Writer writer, java.util.function.Function function, java.util.List<java.lang.Object> scopes)
-
writeTemplate
protected java.io.Writer writeTemplate(java.io.Writer writer, java.lang.String templateText, java.util.List<java.lang.Object> scopes)
-
execute
protected java.io.Writer execute(java.io.Writer writer, java.lang.Object resolve, java.util.List<java.lang.Object> scopes)
-
next
public java.io.Writer next(java.io.Writer writer, java.lang.Object next, java.util.List<java.lang.Object> scopes)
-
-