com.github.mustachejava.codes
Class ValueCode
java.lang.Object
com.github.mustachejava.codes.DefaultCode
com.github.mustachejava.codes.ValueCode
- All Implemented Interfaces:
- Code, java.lang.Cloneable
public class ValueCode
- extends DefaultCode
Output a value
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, clone, execute, get, getCodes, getWrapper, init, runCodes, runIdentity, setCodes |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ValueCode
public ValueCode(TemplateContext tc,
DefaultMustacheFactory cf,
java.lang.String variable,
boolean encoded)
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 toscopes
- 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.