Class Mustache.IncludedTemplateSegment

Enclosing class:
Mustache

protected static class Mustache.IncludedTemplateSegment extends Mustache.AbstractPartialSegment
A segment that loads and executes a sub-template by spec called a partial.
  • Field Details

    • _standalone

      protected boolean _standalone
  • Constructor Details

  • Method Details

    • decompile

      public void decompile(Mustache.Delims delims, StringBuilder into)
      Specified by:
      decompile in class Template.Segment
    • visit

      public void visit(Mustache.Visitor visitor)
      Specified by:
      visit in class Template.Segment
    • indent

      protected Mustache.IncludedTemplateSegment indent(String indent, boolean first, boolean last)
      Description copied from class: Template.Segment
      Recursively indent by the parameter indent.
      Specified by:
      indent in class Template.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.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • isStandalone

      public 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. Once trim is called, standalone tags are determined so that proper (re)indentation will work without reparsing the template.
      Specified by:
      isStandalone in class Mustache.AbstractPartialSegment
      Returns:
      true if the tag is standalone.