Interface Indenter

All Known Implementing Classes:
SimpleIndenter

public interface Indenter
A strategy to indent or in other words pretty print the markup.

EXPERIMENTAL MAY CHANGE

Since:
0.2.0
See Also:
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static enum 
    Indicates the current position (cursor) of where whitespace is to be applied.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    indentTag(Appendable a, int innerDepth, int outerDepth, Indenter.TagIndentSpot spot, String tag, MarkupBuilder.TagClosingPolicy p, boolean empty)
    Called by the builder to provide whitespace decoration.
  • Method Details

    • indentTag

      void indentTag(Appendable a, int innerDepth, int outerDepth, Indenter.TagIndentSpot spot, String tag, MarkupBuilder.TagClosingPolicy p, boolean empty) throws IOException
      Called by the builder to provide whitespace decoration. The arguments provides context of what tag, kind of tag and closing policy etc.

      EXPERIMENTAL MAY CHANGE

      Parameters:
      a - writer like object where indenting decoration is to be applied.
      innerDepth - current indent depth inside the current builder.
      outerDepth - starting depth based on the outside builder if there is one. Usually this is zero.
      spot - current position that white space is to be applied.
      tag - the tag to be indented, not null.
      p - closing policy for the tag to be indented.
      empty - if the tag is empty.
      Throws:
      IOException
      See Also: