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.
TABULATORs 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 charSpecial character at the beginning of a line that flushes a tabular layout.static final charSpecial character at the beginning of a line that indents the following text by one position.static final charSpecial character indicating a tabular layout of all following lines untilUNINDENT.static final charSpecial 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:
writein classFilterWriter- Throws:
IOException
-
write
- Overrides:
writein classFilterWriter- Throws:
IOException
-
write
- Overrides:
writein classFilterWriter- Throws:
IOException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classFilterWriter- Throws:
IOException
-
flush
- Specified by:
flushin interfaceFlushable- Overrides:
flushin classFilterWriter- Throws:
IOException
-