Interface IRichStringIndentationHandler

  • All Known Implementing Classes:
    DefaultIndentationHandler, ValidatingRichStringAcceptor

    public interface IRichStringIndentationHandler
    The indentation handler encapsulates the logic of rich string indentation with respect to template and semantic whitespace per line.
    • Method Detail

      • pushTemplateIndentation

        void pushTemplateIndentation​(java.lang.CharSequence completeIndentation)
        Announce template indentation. The passed indentation is expected to contain the complete whitespace prefix of a line. Implementors will extract the new parts from it automatically.
        Parameters:
        completeIndentation - the leading whitespace of a line. May not be null.
      • pushSemanticIndentation

        void pushSemanticIndentation​(java.lang.CharSequence completeIndentation)
        Announce semantic indentation. The passed indentation is expected to contain the complete whitespace prefix of a line. Implementors will extract the new parts from it automatically.
        Parameters:
        completeIndentation - the leading whitespace of a line. May not be null.
      • popIndentation

        void popIndentation()
        Drop the recently announced indentation and use the previous state.
      • getTotalSemanticIndentation

        java.lang.CharSequence getTotalSemanticIndentation()
        Return the current semantic indentation.
        Returns:
        the complete semantic indentation. Never null.
      • getTotalIndentation

        java.lang.CharSequence getTotalIndentation()
        Return the current indentation.
        Returns:
        the complete indentation. Never null.