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
_comp
protected java.lang.String
_indent
private Template
_template
private java.util.concurrent.locks.Lock
lock
-
Fields inherited from class com.samskivert.mustache.Mustache.NamedSegment
_line, _name
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractPartialSegment(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()
void
execute(Template tmpl, Template.Context ctx, java.io.Writer out)
protected Template
getTemplate()
abstract boolean
isStandalone()
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:
execute
in classTemplate.Segment
-
getTemplate
protected final Template getTemplate()
-
_loadTemplate
protected Template _loadTemplate()
-
isStandalone
public abstract boolean isStandalone()
Description copied from class:Template.Segment
Whether 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. Oncetrim
is called, standalone tags are determined so that proper (re)indentation will work without reparsing the template.- Specified by:
isStandalone
in classTemplate.Segment
- Returns:
- true if the tag is standalone.
-
-