Public Member Functions | Static Public Attributes | Protected Member Functions

org.exolab.javasource.JSourceWriter Class Reference

Inherits java::io::Writer.

List of all members.

Public Member Functions

 JSourceWriter (Writer out)
 JSourceWriter (Writer out, boolean autoflush)
 JSourceWriter (Writer out, short tabSize, boolean autoflush)
 JSourceWriter (Writer out, short tabSize, char tabChar, boolean autoflush)
String getLineSeparator ()
void indent ()
boolean isNewline ()
void setLineSeparator (String lineSeparator)
void unindent ()
void write (float f)
void write (long l)
void write (double d)
void write (Object obj)
void write (boolean b)
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)
void close ()
void flush ()
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)

Static Public Attributes

static final char DEFAULT_CHAR = ' '
static final short DEFAULT_SIZE = 4

Protected Member Functions

short getIndentLevel ()
short getIndentSize ()
char getIndentChar ()
void writeIndent ()

Detailed Description

The writer used by the javasource classes

Author:
Keith Visco
Version:
Revision:
1.1.1.1
Date:
2003/03/03 07:09:56

Constructor & Destructor Documentation

org.exolab.javasource.JSourceWriter.JSourceWriter ( Writer  out  ) 

Creates a new JSourceWriter

Parameters:
out the Writer to write the actual output to

References org.exolab.javasource.JSourceWriter.DEFAULT_CHAR, and org.exolab.javasource.JSourceWriter.DEFAULT_SIZE.

org.exolab.javasource.JSourceWriter.JSourceWriter ( Writer  out,
boolean  autoflush 
)

Creates a new JSourceWriter

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

References org.exolab.javasource.JSourceWriter.DEFAULT_CHAR, and org.exolab.javasource.JSourceWriter.DEFAULT_SIZE.

org.exolab.javasource.JSourceWriter.JSourceWriter ( Writer  out,
short  tabSize,
boolean  autoflush 
)

Creates a new JSourceWriter

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

References org.exolab.javasource.JSourceWriter.DEFAULT_CHAR.

org.exolab.javasource.JSourceWriter.JSourceWriter ( Writer  out,
short  tabSize,
char  tabChar,
boolean  autoflush 
)

Creates a new JSourceWriter

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

Member Function Documentation

void org.exolab.javasource.JSourceWriter.close (  ) 
void org.exolab.javasource.JSourceWriter.flush (  ) 
char org.exolab.javasource.JSourceWriter.getIndentChar (  )  [protected]
short org.exolab.javasource.JSourceWriter.getIndentLevel (  )  [protected]
short org.exolab.javasource.JSourceWriter.getIndentSize (  )  [protected]

Returns the current indent size (getIndentLevel()*tabSize);

Returns:
the current indent size

Referenced by org.exolab.javasource.JComment.print().

String org.exolab.javasource.JSourceWriter.getLineSeparator (  ) 

Returns the line separator being used by this JSourceWriter

Returns:
the line separator being used by this JSourceWriter
void org.exolab.javasource.JSourceWriter.indent (  ) 
boolean org.exolab.javasource.JSourceWriter.isNewline (  ) 

Checks to see if the cursor is positioned on a new line

Returns:
true if the cursor is at the start of a new line, otherwise false

Referenced by org.exolab.javasource.JConstructor.print().

void org.exolab.javasource.JSourceWriter.setLineSeparator ( String  lineSeparator  ) 

Sets the line separator to use at the end of each line

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

Referenced by org.exolab.javasource.JStructure.print(), and org.exolab.javasource.JCompUnit.print().

void org.exolab.javasource.JSourceWriter.unindent (  ) 
void org.exolab.javasource.JSourceWriter.write ( double  d  ) 
void org.exolab.javasource.JSourceWriter.write ( Object  obj  ) 
void org.exolab.javasource.JSourceWriter.write ( char[]  buf,
int  off,
int  len 
)
void org.exolab.javasource.JSourceWriter.write ( boolean  b  ) 
void org.exolab.javasource.JSourceWriter.write ( String  s,
int  off,
int  len 
)
void org.exolab.javasource.JSourceWriter.write ( char[]  buf  ) 
void org.exolab.javasource.JSourceWriter.write ( float  f  ) 
void org.exolab.javasource.JSourceWriter.write ( String  s  ) 
void org.exolab.javasource.JSourceWriter.write ( int  c  ) 
void org.exolab.javasource.JSourceWriter.write ( long  l  ) 
void org.exolab.javasource.JSourceWriter.writeIndent (  )  [protected]
void org.exolab.javasource.JSourceWriter.writeln ( char  c  ) 
void org.exolab.javasource.JSourceWriter.writeln ( float  f  ) 
void org.exolab.javasource.JSourceWriter.writeln (  ) 
void org.exolab.javasource.JSourceWriter.writeln ( long  l  ) 
void org.exolab.javasource.JSourceWriter.writeln ( int  i  ) 
void org.exolab.javasource.JSourceWriter.writeln ( double  d  ) 
void org.exolab.javasource.JSourceWriter.writeln ( boolean  b  ) 
void org.exolab.javasource.JSourceWriter.writeln ( char[]  chars  ) 
void org.exolab.javasource.JSourceWriter.writeln ( Object  obj  ) 
void org.exolab.javasource.JSourceWriter.writeln ( String  string  ) 

Member Data Documentation

The default character to use for indentation

Referenced by org.exolab.javasource.JSourceWriter.JSourceWriter().

The default indentation size

Referenced by org.exolab.javasource.JSourceWriter.JSourceWriter().


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Enumerations Properties