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
A segment that represents an inverted section.
-
Field Summary
FieldsFields inherited from class com.samskivert.mustache.Mustache.AbstractSectionSegment
_segs, _standaloneEnd, _standaloneStart
Fields inherited from class com.samskivert.mustache.Mustache.NamedSegment
_line, _name
-
Constructor Summary
ConstructorsModifierConstructorDescriptionInvertedSegment
(Mustache.Compiler compiler, String name, Template.Segment[] segs, int line) protected
InvertedSegment
(Mustache.InvertedSegment original, Template.Segment[] segs) -
Method Summary
Modifier and TypeMethodDescriptionvoid
decompile
(Mustache.Delims delims, StringBuilder into) void
execute
(Template tmpl, Template.Context ctx, Writer out) protected Mustache.InvertedSegment
Recursively indent by the parameter indent.replaceBlocks
(Map<String, Mustache.BlockSegment> blocks) toString()
void
visit
(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 Details
-
_comp
-
-
Constructor Details
-
InvertedSegment
-
InvertedSegment
-
-
Method Details
-
execute
- Specified by:
execute
in classTemplate.Segment
-
decompile
- Specified by:
decompile
in classTemplate.Segment
-
visit
- Specified by:
visit
in classTemplate.Segment
-
indent
Description copied from class:Template.Segment
Recursively indent by the parameter indent.- Specified by:
indent
in classMustache.AbstractSectionSegment
- Parameters:
indent
- should be space characters that are not\n
.first
- append indent to the first line (regardless if it has a\n
or not).last
- append indent on the last\n
that has no text after it.- Returns:
- a newly created segment or the same segment if nothing changed.
-
replaceBlocks
-
toString
-