public class DefaultCode extends java.lang.Object implements Code, java.lang.Cloneable
| Modifier and Type | Field and Description |
|---|---|
protected java.lang.String |
appended |
private char[] |
appendedChars |
protected Binding |
binding |
protected DefaultMustacheFactory |
df |
protected Mustache |
mustache |
protected java.lang.String |
name |
protected ObjectHandler |
oh |
protected boolean |
returnThis |
protected TemplateContext |
tc |
protected java.lang.String |
type |
| Constructor and Description |
|---|
DefaultCode() |
DefaultCode(TemplateContext tc,
DefaultMustacheFactory df,
Mustache mustache,
java.lang.String name,
java.lang.String type) |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
addScope(java.util.List<java.lang.Object> scopes,
java.lang.Object scope) |
void |
append(java.lang.String text) |
protected java.io.Writer |
appendText(java.io.Writer writer) |
java.lang.Object |
clone() |
java.lang.Object |
clone(java.util.Set<Code> seen) |
java.io.Writer |
execute(java.io.Writer writer,
java.util.List<java.lang.Object> scopes)
The default behavior is to run the codes and append the captured text.
|
protected void |
filterText() |
java.lang.Object |
get(java.util.List<java.lang.Object> scopes) |
Code[] |
getCodes() |
java.lang.String |
getName() |
void |
identity(java.io.Writer writer) |
void |
init() |
Node |
invert(Node node,
java.lang.String text,
java.util.concurrent.atomic.AtomicInteger position) |
protected Node |
matchAppended(Node node,
java.lang.String text,
java.util.concurrent.atomic.AtomicInteger position,
int start) |
protected java.io.Writer |
run(java.io.Writer writer,
java.util.List<java.lang.Object> scopes) |
protected void |
runIdentity(java.io.Writer writer) |
void |
setCodes(Code[] newcodes) |
protected void |
tag(java.io.Writer writer,
java.lang.String tag) |
protected java.lang.String appended
protected Mustache mustache
protected final ObjectHandler oh
protected final java.lang.String name
protected final TemplateContext tc
protected final java.lang.String type
protected final boolean returnThis
protected final Binding binding
protected final DefaultMustacheFactory df
private char[] appendedChars
public DefaultCode()
public DefaultCode(TemplateContext tc, DefaultMustacheFactory df, Mustache mustache, java.lang.String name, java.lang.String type)
public java.lang.Object clone()
public Node invert(Node node, java.lang.String text, java.util.concurrent.atomic.AtomicInteger position)
protected Node matchAppended(Node node, java.lang.String text, java.util.concurrent.atomic.AtomicInteger position, int start)
protected void filterText()
public java.lang.Object get(java.util.List<java.lang.Object> scopes)
public java.io.Writer execute(java.io.Writer writer,
java.util.List<java.lang.Object> scopes)
protected void runIdentity(java.io.Writer writer)
protected void tag(java.io.Writer writer,
java.lang.String tag)
throws java.io.IOException
java.io.IOExceptionprotected java.io.Writer appendText(java.io.Writer writer)
protected java.io.Writer run(java.io.Writer writer,
java.util.List<java.lang.Object> scopes)
protected boolean addScope(java.util.List<java.lang.Object> scopes,
java.lang.Object scope)