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 Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
accept(IRichStringPartAcceptor acceptor)
Announce the current indentation to the acceptor.java.lang.CharSequence
getTotalIndentation()
Return the current indentation.java.lang.CharSequence
getTotalSemanticIndentation()
Return the current semantic indentation.void
popIndentation()
Drop the recently announced indentation and use the previous state.void
pushSemanticIndentation(java.lang.CharSequence completeIndentation)
Announce semantic indentation.void
pushTemplateIndentation(java.lang.CharSequence completeIndentation)
Announce template indentation.
-
-
-
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 benull
.
-
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 benull
.
-
popIndentation
void popIndentation()
Drop the recently announced indentation and use the previous state.
-
accept
void accept(IRichStringPartAcceptor acceptor)
Announce the current indentation to the acceptor.
-
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
.
-
-