Package com.github.mustachejava.codes
Class DefaultCode
java.lang.Object
com.github.mustachejava.codes.DefaultCode
- Direct Known Subclasses:
CommentCode,DefaultMustache,ExtendCheckNameCode,ExtendNameCode,IterableCode,PartialCode,ValueCode,WriteCode
Simplest possible code implementaion with some default shared behavior
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Stringprivate char[]protected final Bindingprotected final DefaultMustacheFactoryprotected Mustacheprotected final Stringprotected final ObjectHandlerprotected final booleanprotected final TemplateContextprotected final String -
Constructor Summary
ConstructorsConstructorDescriptionDefaultCode(TemplateContext tc, DefaultMustacheFactory df, Mustache mustache, String name, String type) -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanvoidprotected WriterappendText(Writer writer) clone()The default behavior is to run the codes and append the captured text.protected voidCode[]getCodes()getName()voidvoidinit()invert(Node node, String text, AtomicInteger position) protected NodematchAppended(Node node, String text, AtomicInteger position, int start) protected Writerprotected voidrunIdentity(Writer writer) voidprotected void
-
Field Details
-
appended
-
mustache
-
oh
-
name
-
tc
-
type
-
returnThis
protected final boolean returnThis -
binding
-
df
-
appendedChars
private char[] appendedChars
-
-
Constructor Details
-
DefaultCode
public DefaultCode() -
DefaultCode
public DefaultCode(TemplateContext tc, DefaultMustacheFactory df, Mustache mustache, String name, String type)
-
-
Method Details
-
clone
-
clone
-
invert
-
matchAppended
-
getCodes
-
init
public void init() -
filterText
protected void filterText() -
setCodes
-
get
-
execute
The default behavior is to run the codes and append the captured text. -
identity
-
runIdentity
-
tag
- Throws:
IOException
-
appendText
-
run
-
append
-
addScope
-
getName
-