Class IndentationCorrectingWriter.StateContext

  • Enclosing class:
    IndentationCorrectingWriter

    private static class IndentationCorrectingWriter.StateContext
    extends java.lang.Object
    Keeps the current context of parsing the given character buffer.
    • Field Detail

      • writer

        final java.io.Writer writer
      • characters

        char[] characters
      • lastStateChange

        int lastStateChange
        The position at which when the current state was entered.
      • currentIndex

        int currentIndex
        The current position within the buffer.
      • indentationLevel

        private int indentationLevel
        Keeps track of the current indentation level, as implied by brace characters.
    • Constructor Detail

      • StateContext

        StateContext​(java.io.Writer writer)
    • Method Detail

      • reset

        void reset​(char[] characters,
                   int off)
      • incrementIndentationLevel

        void incrementIndentationLevel()
      • decrementIndentationLevel

        void decrementIndentationLevel()
      • getIndentationLevel

        int getIndentationLevel()