private static final class TextFormat.TextGenerator
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private boolean |
atStartOfLine |
private java.lang.StringBuilder |
indent |
private java.lang.Appendable |
output |
private boolean |
singleLineMode |
Modifier | Constructor and Description |
---|---|
private |
TextGenerator(java.lang.Appendable output,
boolean singleLineMode) |
Modifier and Type | Method and Description |
---|---|
void |
eol()
Signifies reaching the "end of the current line" in the output.
|
void |
indent()
Indent text by two spaces.
|
void |
outdent()
Reduces the current indent level by two spaces, or crashes if the indent
level is zero.
|
void |
print(java.lang.CharSequence text)
Print text to the output stream.
|
private final java.lang.Appendable output
private final java.lang.StringBuilder indent
private final boolean singleLineMode
private boolean atStartOfLine
private TextGenerator(java.lang.Appendable output, boolean singleLineMode)
public void indent()
public void outdent()
public void print(java.lang.CharSequence text) throws java.io.IOException
java.io.IOException
public void eol() throws java.io.IOException
java.io.IOException