Package com.github.mustachejava.codes
Class ValueCode
java.lang.Object
com.github.mustachejava.codes.DefaultCode
com.github.mustachejava.codes.ValueCode
- Direct Known Subclasses:
SpecMustacheVisitor.SpecValueCode
Output a value
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Patternprotected final booleanprotected final ExecutorServiceFields inherited from class com.github.mustachejava.codes.DefaultCode
appended, binding, df, mustache, name, oh, returnThis, tc, type -
Constructor Summary
ConstructorsConstructorDescriptionValueCode(TemplateContext tc, DefaultMustacheFactory df, String variable, boolean encoded) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidprivate voidThe default behavior is to run the codes and append the captured text.protected WriterhandleCallable(Writer writer, Callable callable, List<Object> scopes) protected voidhandleFunction(Writer writer, Function function, List<Object> scopes) voidinvert(Node node, String text, AtomicInteger position) Methods inherited from class com.github.mustachejava.codes.DefaultCode
addScope, append, appendText, clone, clone, filterText, get, getCodes, getName, init, matchAppended, run, runIdentity, setCodes, tag
-
Field Details
-
encoded
protected final boolean encoded -
les
-
compiledAppended
-
-
Constructor Details
-
ValueCode
-
-
Method Details
-
identity
- Specified by:
identityin interfaceCode- Overrides:
identityin classDefaultCode
-
execute
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.
-
handleCallable
protected Writer handleCallable(Writer writer, Callable callable, List<Object> scopes) throws Exception - Throws:
Exception
-
execute
- Throws:
Exception
-
handleFunction
protected void handleFunction(Writer writer, Function function, List<Object> scopes) throws IOException - Throws:
IOException
-
execute
- Throws:
IOException
-
invert
- Specified by:
invertin interfaceCode- Overrides:
invertin classDefaultCode
-