Class Template.Segment

    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected Segment()  
    • Constructor Detail

      • Segment

        protected Segment()
    • Method Detail

      • decompile

        abstract void decompile​(Mustache.Delims delims,
                                java.lang.StringBuilder into)
      • indent

        abstract Template.Segment indent​(java.lang.String indent,
                                         boolean first,
                                         boolean last)
        Recursively indent by the parameter indent.
        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

        abstract boolean isStandalone()
        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.
        Returns:
        true if the tag is standalone.
      • write

        protected static void write​(java.io.Writer out,
                                    java.lang.CharSequence data)