Module com.samskivert.jmustache
Package com.samskivert.mustache
Class Mustache.AbstractPartialSegment
- java.lang.Object
-
- com.samskivert.mustache.Template.Segment
-
- com.samskivert.mustache.Mustache.NamedSegment
-
- com.samskivert.mustache.Mustache.AbstractPartialSegment
-
- Direct Known Subclasses:
Mustache.IncludedTemplateSegment,Mustache.ParentTemplateSegment
- Enclosing class:
- Mustache
protected abstract static class Mustache.AbstractPartialSegment extends Mustache.NamedSegment
An abstract segment that is a template include.
-
-
Field Summary
Fields Modifier and Type Field Description protected Mustache.Compiler_compprotected java.lang.String_indentprivate Template_templateprivate java.util.concurrent.locks.Locklock-
Fields inherited from class com.samskivert.mustache.Mustache.NamedSegment
_line, _name
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractPartialSegment(Mustache.Compiler compiler, java.lang.String name, int line, java.lang.String indent)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected Template_loadTemplate()voidexecute(Template tmpl, Template.Context ctx, java.io.Writer out)protected TemplategetTemplate()abstract booleanisStandalone()Whether or not the segment is standalone.-
Methods inherited from class com.samskivert.mustache.Template.Segment
decompile, indent, visit, write
-
-
-
-
Field Detail
-
_comp
protected final Mustache.Compiler _comp
-
_indent
protected final java.lang.String _indent
-
lock
private final java.util.concurrent.locks.Lock lock
-
_template
private volatile Template _template
-
-
Constructor Detail
-
AbstractPartialSegment
protected AbstractPartialSegment(Mustache.Compiler compiler, java.lang.String name, int line, java.lang.String indent)
-
-
Method Detail
-
execute
public final void execute(Template tmpl, Template.Context ctx, java.io.Writer out)
- Specified by:
executein classTemplate.Segment
-
getTemplate
protected final Template getTemplate()
-
_loadTemplate
protected Template _loadTemplate()
-
isStandalone
public abstract boolean isStandalone()
Description copied from class:Template.SegmentWhether or not the segment is standalone. The definition of standalone is defined by the mustache spec. String and variable tags are never standalone. For blocks this is based on the closing tag. Oncetrimis called, standalone tags are determined so that proper (re)indentation will work without reparsing the template.- Specified by:
isStandalonein classTemplate.Segment- Returns:
- true if the tag is standalone.
-
-