Package org.codehaus.janino.util
Class AutoIndentWriter
java.lang.Object
java.io.Writer
java.io.FilterWriter
org.codehaus.janino.util.AutoIndentWriter
- All Implemented Interfaces:
Closeable
,Flushable
,Appendable
,AutoCloseable
A
FilterWriter
that indents lines by processing some control characters in the character stream.
INDENT
or UNINDENT
may precede lines and indicate that the line and all following lines should
be (un)indented by one position.
TABULATOR
s may appear anywhere in lines and dictate that portions of all following lines should be
vertically aligned (see resolveTabs(List)
).
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final char
Special character at the beginning of a line that flushes a tabular layout.static final char
Special character at the beginning of a line that indents the following text by one position.static final char
Special character indicating a tabular layout of all following lines untilUNINDENT
.static final char
Special character at the beginning of a line that unindents the following text by one position.Fields inherited from class java.io.FilterWriter
out
-
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
TABULATOR
public static final char TABULATORSpecial character indicating a tabular layout of all following lines untilUNINDENT
.- See Also:
-
CLEAR_TABULATORS
public static final char CLEAR_TABULATORSSpecial character at the beginning of a line that flushes a tabular layout.- See Also:
-
INDENT
public static final char INDENTSpecial character at the beginning of a line that indents the following text by one position.- See Also:
-
UNINDENT
public static final char UNINDENTSpecial character at the beginning of a line that unindents the following text by one position.- See Also:
-
-
Constructor Details
-
AutoIndentWriter
-
-
Method Details
-
write
- Overrides:
write
in classFilterWriter
- Throws:
IOException
-
write
- Overrides:
write
in classFilterWriter
- Throws:
IOException
-
write
- Overrides:
write
in classFilterWriter
- Throws:
IOException
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classFilterWriter
- Throws:
IOException
-
flush
- Specified by:
flush
in interfaceFlushable
- Overrides:
flush
in classFilterWriter
- Throws:
IOException
-