org.exolab.javasource
public final class JSourceWriter extends Writer
Version: $Revision: 6324 $ $Date: 2005-03-30 03:29:24 -0700 (Wed, 30 Mar 2005) $
| Field Summary | |
|---|---|
| static char | DEFAULT_CHAR The default character to use for indentation. |
| static short | DEFAULT_SIZE The default indentation size. |
| Constructor Summary | |
|---|---|
| JSourceWriter(Writer out)
Creates a new JSourceWriter.
| |
| JSourceWriter(Writer out, boolean autoflush)
Creates a new JSourceWriter.
| |
| JSourceWriter(Writer out, short tabSize, boolean autoflush)
Creates a new JSourceWriter.
| |
| JSourceWriter(Writer out, short tabSize, char tabChar, boolean autoflush)
Creates a new JSourceWriter.
| |
| Method Summary | |
|---|---|
| void | close() |
| void | flush() |
| protected char | getIndentChar()
Returns the current character used for indentation. |
| protected short | getIndentLevel()
Returns the current indentation level.
|
| protected short | getIndentSize()
Returns the current indent size (getIndentLevel()*tabSize).
|
| String | getLineSeparator()
Returns the line separator being used by this JSourceWriter.
|
| void | indent()
Increases the indentation level by 1. |
| boolean | isNewline()
Checks to see if the cursor is positioned on a new line.
|
| void | setLineSeparator(String lineSeparator)
Sets the line separator to use at the end of each line. |
| void | unindent()
Decreases the indentation level by 1. |
| void | write(float f) |
| void | write(long l) |
| void | write(double d) |
| void | write(Object obj) |
| void | write(boolean b) |
| void | write(String s, int off, int len) |
| void | write(String s) |
| void | write(char[] buf) |
| void | write(int c) |
| void | write(char[] buf, int off, int len) |
| protected void | writeIndent()
Always applies the current indentation. |
| void | writeln() |
| void | writeln(float f) |
| void | writeln(long l) |
| void | writeln(int i) |
| void | writeln(double d) |
| void | writeln(Object obj) |
| void | writeln(String string) |
| void | writeln(char[] chars) |
| void | writeln(boolean b) |
| void | writeln(char c) |
Parameters: out the Writer to write the actual output to
Parameters: out the Writer to write the actual output to autoflush a boolean indicating whether or not to perform automatic flush at the end of a line
Parameters: out the Writer to write the actual output to tabSize the size of each indentation autoflush a boolean indicating whether or not to perform automatic flush at the end of a line
Parameters: out the Writer to write the actual output to tabSize the size of each indentation tabChar the character to use for indentation autoflush a boolean indicating whether or not to perform an automatic flush at the end of each line
Returns: the current character used for indentation.
Returns: the current indentation level.
Returns: the current indent size
Returns: the line separator being used by this JSourceWriter.
Returns: true if the cursor is at the start of a new line, otherwise false
Parameters: lineSeparator the String to use as a line separator.