| java.lang.Object java.io.Writer org.exolab.javasource.JSourceWriter
JSourceWriter | final public class JSourceWriter extends Writer (Code) | | The writer used by the javasource classes.
author: Keith Visco version: $Revision: 6669 $ $Date: 2005-03-30 03:29:24 -0700 (Wed, 30 Mar 2005) $ |
Field Summary | |
final public static char | DEFAULT_CHAR The default character to use for indentation. | final public static short | DEFAULT_SIZE The default indentation size. |
DEFAULT_CHAR | final public static char DEFAULT_CHAR(Code) | | The default character to use for indentation.
|
DEFAULT_SIZE | final public static short DEFAULT_SIZE(Code) | | The default indentation size.
|
JSourceWriter | public JSourceWriter(Writer out)(Code) | | Creates a new JSourceWriter.
Parameters: out - The Writer to write the actual output to. |
JSourceWriter | public JSourceWriter(Writer out, boolean autoflush)(Code) | | Creates a new JSourceWriter.
Parameters: out - The Writer to write the actual output to. Parameters: autoflush - A boolean indicating whether or not to perform automaticflush at the end of a line. |
JSourceWriter | public JSourceWriter(Writer out, short tabSize, boolean autoflush)(Code) | | Creates a new JSourceWriter.
Parameters: out - The Writer to write the actual output to. Parameters: tabSize - The size of each indentation. Parameters: autoflush - A boolean indicating whether or not to perform automaticflush at the end of a line. |
JSourceWriter | public JSourceWriter(Writer out, short tabSize, char tabChar, boolean autoflush)(Code) | | Creates a new JSourceWriter.
Parameters: out - The Writer to write the actual output to. Parameters: tabSize - The size of each indentation. Parameters: tabChar - The character to use for indentation. Parameters: autoflush - A boolean indicating whether or not to perform an automaticflush at the end of each line. |
close | public void close()(Code) | | |
flush | public void flush()(Code) | | |
getIndentChar | protected char getIndentChar()(Code) | | Returns the current character used for indentation.
The current character used for indentation. |
getIndentLevel | protected short getIndentLevel()(Code) | | Returns the current indentation level.
The current indentation level. |
getIndentSize | protected short getIndentSize()(Code) | | Returns the current indent size (getIndentLevel()*tabSize).
The current indent size. |
getLineSeparator | public String getLineSeparator()(Code) | | Returns the line separator being used by this JSourceWriter.
The line separator being used by this JSourceWriter. |
indent | public void indent()(Code) | | Increases the indentation level by 1.
|
isNewline | public boolean isNewline()(Code) | | Checks to see if the cursor is positioned on a new line.
True if the cursor is at the start of a new line, otherwise false. |
setLineSeparator | public void setLineSeparator(String lineSeparator)(Code) | | Sets the line separator to use at the end of each line. Typically a line
separator will be one of the following:
- "\r\n" for MS Windows
- "\n" for UNIX
- "\r" for Macintosh
Parameters: lineSeparator - The String to use as a line separator. |
unindent | public void unindent()(Code) | | Decreases the indentation level by 1.
|
write | public void write(float f)(Code) | | |
write | public void write(long l)(Code) | | |
write | public void write(double d)(Code) | | |
write | public void write(boolean b)(Code) | | |
write | public void write(char[] buf)(Code) | | |
write | public void write(int c)(Code) | | |
write | public void write(char[] buf, int off, int len)(Code) | | |
writeIndent | protected void writeIndent()(Code) | | Always applies the current indentation.
|
writeln | public void writeln()(Code) | | |
writeln | public void writeln(float f)(Code) | | |
writeln | public void writeln(long l)(Code) | | |
writeln | public void writeln(int i)(Code) | | |
writeln | public void writeln(double d)(Code) | | |
writeln | public void writeln(char[] chars)(Code) | | |
writeln | public void writeln(boolean b)(Code) | | |
writeln | public void writeln(char c)(Code) | | |
|
|