- java.lang.Object
-
- com.samskivert.mustache.Template.Segment
-
- com.samskivert.mustache.Mustache.FauxSegment
-
- Enclosing class:
- Mustache
protected static class Mustache.FauxSegment extends Template.Segment
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
FauxSegment()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
decompile(Mustache.Delims delims, java.lang.StringBuilder into)
void
execute(Template tmpl, Template.Context ctx, java.io.Writer out)
(package private) Mustache.FauxSegment
indent(java.lang.String indent, boolean first, boolean last)
Recursively indent by the parameter indent.(package private) boolean
isStandalone()
Whether or not the segment is standalone.java.lang.String
toString()
void
visit(Mustache.Visitor visit)
-
Methods inherited from class com.samskivert.mustache.Template.Segment
write
-
-
-
-
Method Detail
-
execute
public void execute(Template tmpl, Template.Context ctx, java.io.Writer out)
- Specified by:
execute
in classTemplate.Segment
-
decompile
public void decompile(Mustache.Delims delims, java.lang.StringBuilder into)
- Specified by:
decompile
in classTemplate.Segment
-
visit
public void visit(Mustache.Visitor visit)
- Specified by:
visit
in classTemplate.Segment
-
indent
Mustache.FauxSegment indent(java.lang.String indent, boolean first, boolean last)
Description copied from class:Template.Segment
Recursively indent by the parameter indent.- Specified by:
indent
in classTemplate.Segment
- 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.
-
isStandalone
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.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-