com.github.mustachejava.codes
Class ValueCode

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

public class ValueCode
extends DefaultCode

Output a value


Field Summary
 
Fields inherited from class com.github.mustachejava.codes.DefaultCode
appended, debug, logger, mustache, name, oh, returnThis, tc, type
 
Constructor Summary
ValueCode(TemplateContext tc, DefaultMustacheFactory cf, java.lang.String variable, boolean encoded)
           
 
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  void execute(java.io.Writer writer, java.lang.String value)
           
protected  java.io.Writer handleCallable(java.io.Writer writer, java.util.concurrent.Callable callable, java.lang.Object[] scopes)
           
protected  void handleFunction(java.io.Writer writer, com.google.common.base.Function function, java.lang.Object[] scopes)
           
 void identity(java.io.Writer writer)
           
 
Methods inherited from class com.github.mustachejava.codes.DefaultCode
addScope, append, appendText, execute, get, getCodes, getWrapper, init, runCodes, runIdentity, setCodes
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ValueCode

public ValueCode(TemplateContext tc,
                 DefaultMustacheFactory cf,
                 java.lang.String variable,
                 boolean encoded)
Method Detail

identity

public void identity(java.io.Writer writer)
Specified by:
identity in interface Code
Overrides:
identity in class DefaultCode

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)
                                 throws java.lang.Exception
Throws:
java.lang.Exception

handleFunction

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

execute

protected void execute(java.io.Writer writer,
                       java.lang.String value)
                throws java.io.IOException
Throws:
java.io.IOException


Copyright © 2012. All Rights Reserved.