com.github.mustachejava.codes
Class PartialCode
java.lang.Object
com.github.mustachejava.codes.DefaultCode
com.github.mustachejava.codes.PartialCode
- All Implemented Interfaces:
- Code, java.lang.Cloneable
- Direct Known Subclasses:
- ExtendCode
public class PartialCode
- extends DefaultCode
|
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 java.io.Writer |
execute(java.io.Writer writer,
java.lang.Object scope,
java.lang.Object[] scopes)
|
Code[] |
getCodes()
|
void |
init()
|
protected java.io.Writer |
partialExecute(java.io.Writer writer,
java.lang.Object[] scopes)
|
protected java.lang.String |
partialName()
Builds the file name to be included by this partial tag. |
void |
setCodes(Code[] newcodes)
|
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
extension
protected final java.lang.String extension
partial
protected Mustache partial
PartialCode
protected PartialCode(TemplateContext tc,
DefaultMustacheFactory cf,
Mustache mustache,
java.lang.String type,
java.lang.String variable)
PartialCode
public PartialCode(TemplateContext tc,
DefaultMustacheFactory cf,
java.lang.String variable)
getCodes
public Code[] getCodes()
- Specified by:
getCodes in interface Code- Overrides:
getCodes in class DefaultCode
setCodes
public void setCodes(Code[] newcodes)
- Specified by:
setCodes in interface Code- Overrides:
setCodes 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.
init
public void init()
- Specified by:
init in interface Code- Overrides:
init in class DefaultCode
partialName
protected java.lang.String partialName()
- Builds the file name to be included by this partial tag. Default implementation ppends the tag contents with
the current file's extension.
- Returns:
- The filename to be included by this partial tag
partialExecute
protected java.io.Writer partialExecute(java.io.Writer writer,
java.lang.Object[] scopes)
execute
protected java.io.Writer execute(java.io.Writer writer,
java.lang.Object scope,
java.lang.Object[] scopes)
Copyright © 2012. All Rights Reserved.