Package com.github.mustachejava.codes
Class PartialCode
java.lang.Object
com.github.mustachejava.codes.DefaultCode
com.github.mustachejava.codes.PartialCode
- Direct Known Subclasses:
ExtendCode,SpecMustacheVisitor.SpecPartialCode
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final Stringprotected final Stringprotected booleanprotected Mustacheprotected intFields inherited from class com.github.mustachejava.codes.DefaultCode
appended, binding, df, mustache, name, oh, returnThis, tc, type -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedPartialCode(TemplateContext tc, DefaultMustacheFactory df, Mustache mustache, String type, String variable) PartialCode(TemplateContext tc, DefaultMustacheFactory cf, String variable) -
Method Summary
Methods inherited from class com.github.mustachejava.codes.DefaultCode
addScope, append, appendText, clone, clone, filterText, get, getName, invert, matchAppended, run, runIdentity, tag
-
Field Details
-
extension
-
dir
-
partial
-
recrusionLimit
protected int recrusionLimit -
isRecursive
protected boolean isRecursive
-
-
Constructor Details
-
PartialCode
protected PartialCode(TemplateContext tc, DefaultMustacheFactory df, Mustache mustache, String type, String variable) -
PartialCode
-
-
Method Details
-
identity
- Specified by:
identityin interfaceCode- Overrides:
identityin classDefaultCode
-
getCodes
- Specified by:
getCodesin interfaceCode- Overrides:
getCodesin classDefaultCode
-
setCodes
- Specified by:
setCodesin interfaceCode- Overrides:
setCodesin 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.
-
executePartial
-
init
public void init()- Specified by:
initin interfaceCode- Overrides:
initin classDefaultCode
-
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
-