- java.lang.Object
-
- com.samskivert.mustache.Template.Segment
-
- com.samskivert.mustache.Mustache.NamedSegment
-
- com.samskivert.mustache.Mustache.AbstractSectionSegment
-
- com.samskivert.mustache.Mustache.InvertedSegment
-
- All Implemented Interfaces:
Mustache.BlockReplaceable,Mustache.StandaloneSection
- Enclosing class:
- Mustache
protected static class Mustache.InvertedSegment extends Mustache.AbstractSectionSegment
A segment that represents an inverted section.
-
-
Field Summary
Fields Modifier and Type Field Description protected Mustache.Compiler_comp-
Fields inherited from class com.samskivert.mustache.Mustache.AbstractSectionSegment
_segs, _standaloneEnd, _standaloneStart
-
Fields inherited from class com.samskivert.mustache.Mustache.NamedSegment
_line, _name
-
-
Constructor Summary
Constructors Modifier Constructor Description InvertedSegment(Mustache.Compiler compiler, java.lang.String name, Template.Segment[] segs, int line)protectedInvertedSegment(Mustache.InvertedSegment original, Template.Segment[] segs)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddecompile(Mustache.Delims delims, java.lang.StringBuilder into)voidexecute(Template tmpl, Template.Context ctx, java.io.Writer out)protected Mustache.InvertedSegmentindent(java.lang.String indent, boolean first, boolean last)Recursively indent by the parameter indent.Mustache.InvertedSegmentreplaceBlocks(java.util.Map<java.lang.String,Mustache.BlockSegment> blocks)java.lang.StringtoString()voidvisit(Mustache.Visitor visitor)-
Methods inherited from class com.samskivert.mustache.Mustache.AbstractSectionSegment
_segs, executeSegs, isStandalone, isStandaloneEnd, isStandaloneStart, standaloneEnd, standaloneStart
-
Methods inherited from class com.samskivert.mustache.Template.Segment
write
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.samskivert.mustache.Mustache.StandaloneSection
firstLeadsBlank, lastTrailsBlank, trimFirstBlank, trimLastBlank
-
-
-
-
Field Detail
-
_comp
protected final Mustache.Compiler _comp
-
-
Constructor Detail
-
InvertedSegment
public InvertedSegment(Mustache.Compiler compiler, java.lang.String name, Template.Segment[] segs, int line)
-
InvertedSegment
protected InvertedSegment(Mustache.InvertedSegment original, Template.Segment[] segs)
-
-
Method Detail
-
execute
public void execute(Template tmpl, Template.Context ctx, java.io.Writer out)
- Specified by:
executein classTemplate.Segment
-
decompile
public void decompile(Mustache.Delims delims, java.lang.StringBuilder into)
- Specified by:
decompilein classTemplate.Segment
-
visit
public void visit(Mustache.Visitor visitor)
- Specified by:
visitin classTemplate.Segment
-
indent
protected Mustache.InvertedSegment indent(java.lang.String indent, boolean first, boolean last)
Description copied from class:Template.SegmentRecursively indent by the parameter indent.- Specified by:
indentin classMustache.AbstractSectionSegment- Parameters:
indent- should be space characters that are not\n.first- append indent to the first line (regardless if it has a\nor not).last- append indent on the last\nthat has no text after it.- Returns:
- a newly created segment or the same segment if nothing changed.
-
replaceBlocks
public Mustache.InvertedSegment replaceBlocks(java.util.Map<java.lang.String,Mustache.BlockSegment> blocks)
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-