com.github.mustachejava.codes
Class IterableCode

java.lang.Object
  extended by com.github.mustachejava.codes.DefaultCode
      extended by com.github.mustachejava.codes.IterableCode
All Implemented Interfaces:
Code, Iteration

public class IterableCode
extends DefaultCode
implements Iteration


Field Summary
 
Fields inherited from class com.github.mustachejava.codes.DefaultCode
appended, debug, logger, mustache, name, oh, returnThis, tc, type
 
Constructor Summary
IterableCode(TemplateContext tc, DefaultMustacheFactory cf, Mustache mustache, java.lang.String variable)
           
 
Method Summary
 java.io.Writer execute(java.io.Writer writer, java.lang.Object[] scopes)
          The default behavior is to run the codes and append the captured text.
protected  java.io.Writer execute(java.io.Writer writer, java.lang.Object resolve, java.lang.Object[] scopes)
           
protected  java.io.Writer handleCallable(java.io.Writer writer, java.util.concurrent.Callable callable, java.lang.Object[] scopes)
           
protected  java.io.Writer handleFunction(java.io.Writer writer, com.google.common.base.Function function, java.lang.Object[] scopes)
           
 java.io.Writer next(java.io.Writer writer, java.lang.Object next, java.lang.Object... scopes)
           
protected  java.io.Writer writeTemplate(java.io.Writer writer, java.lang.String templateText, java.lang.Object[] scopes)
           
 
Methods inherited from class com.github.mustachejava.codes.DefaultCode
addScope, append, appendText, execute, get, getCodes, getWrapper, identity, init, runCodes, runIdentity, setCodes
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IterableCode

public IterableCode(TemplateContext tc,
                    DefaultMustacheFactory cf,
                    Mustache mustache,
                    java.lang.String variable)
Method Detail

execute

public java.io.Writer execute(java.io.Writer writer,
                              java.lang.Object[] scopes)
Description copied from class: DefaultCode
The default behavior is to run the codes and append the captured text.

Specified by:
execute in interface Code
Overrides:
execute in class DefaultCode
Parameters:
writer - The writer to write the output to
scopes - The scopes to evaluate the embedded names against.

handleCallable

protected java.io.Writer handleCallable(java.io.Writer writer,
                                        java.util.concurrent.Callable callable,
                                        java.lang.Object[] scopes)

handleFunction

protected java.io.Writer handleFunction(java.io.Writer writer,
                                        com.google.common.base.Function function,
                                        java.lang.Object[] scopes)

writeTemplate

protected java.io.Writer writeTemplate(java.io.Writer writer,
                                       java.lang.String templateText,
                                       java.lang.Object[] scopes)

execute

protected java.io.Writer execute(java.io.Writer writer,
                                 java.lang.Object resolve,
                                 java.lang.Object[] scopes)

next

public java.io.Writer next(java.io.Writer writer,
                           java.lang.Object next,
                           java.lang.Object... scopes)
Specified by:
next in interface Iteration


Copyright © 2012. All Rights Reserved.