org.codehaus.janino.util

Class AutoIndentWriter

public class AutoIndentWriter extends FilterWriter

A java.io.FilterWriter that automatically indents lines by looking at trailing opening braces ('{') and leading closing braces ('}').
Constructor Summary
AutoIndentWriter(Writer out)
Method Summary
voidindent()
voidsetPrefix(String prefix)
The prefix, if non-null, is printed between the indentation space and the line data.
voidunindent()
voidwrite(int c)
voidwrite(char[] cbuf, int off, int len)
voidwrite(String str, int off, int len)

Constructor Detail

AutoIndentWriter

public AutoIndentWriter(Writer out)

Method Detail

indent

public void indent()

setPrefix

public void setPrefix(String prefix)
The prefix, if non-null, is printed between the indentation space and the line data.

unindent

public void unindent()

write

public void write(int c)

write

public void write(char[] cbuf, int off, int len)

write

public void write(String str, int off, int len)