org.exolab.javasource
public class JSourceWriter extends Writer
Version: $Revision: 1.1.1.1 $ $Date: 2003/03/03 07:09:56 $
| 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() |
| protected short | getIndentLevel() |
| 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() |
| 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 automatic flush at the end of a line
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.
Typically a line separator will be one of the following:
"\r\n" for MS Windows
"\n" for UNIX
"\r" for Macintosh