net.sf.jaxme.js
Class WriterTarget

java.lang.Object
  extended bynet.sf.jaxme.js.WriterTarget
All Implemented Interfaces:
IndentationTarget

public class WriterTarget
extends java.lang.Object
implements IndentationTarget

An IndentationTarget writing into a given Writer.

Version:
$Id: WriterTarget.java,v 1.1 2003/05/27 03:17:14 joe Exp $
Author:
Jochen Wiedmann

Field Summary
static java.lang.String INDENTATION_STRING
           
static java.lang.String LINE_SEPARATOR
           
 
Constructor Summary
WriterTarget()
           
WriterTarget(java.io.Writer pTarget)
           
 
Method Summary
 java.lang.String asString(JavaQName pQName)
          Converts a class name into a string.
 java.lang.String getIndentationString()
           
 java.lang.String getLineSeparator()
           
 java.io.Writer getTarget()
           
 void indent(int pLevel)
          Indents the current line by adding blanks for the given indentation level.
 boolean isInterface()
          Returns whether the IndentationEngine is creating a Java interface.
 void setIndentationString(java.lang.String pIndentationString)
           
 void setLineSeparator(java.lang.String pLineSeparator)
           
 void setTarget(java.io.Writer pTarget)
           
 void write()
          Terminates a line in the target.
 void write(java.lang.String pValue)
          Writes a string to the target.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INDENTATION_STRING

public static final java.lang.String INDENTATION_STRING
See Also:
Constant Field Values

LINE_SEPARATOR

public static final java.lang.String LINE_SEPARATOR
See Also:
Constant Field Values
Constructor Detail

WriterTarget

public WriterTarget()

WriterTarget

public WriterTarget(java.io.Writer pTarget)
Method Detail

setTarget

public void setTarget(java.io.Writer pTarget)

getTarget

public java.io.Writer getTarget()

setIndentationString

public void setIndentationString(java.lang.String pIndentationString)

getIndentationString

public java.lang.String getIndentationString()

setLineSeparator

public void setLineSeparator(java.lang.String pLineSeparator)

getLineSeparator

public java.lang.String getLineSeparator()

isInterface

public boolean isInterface()
Description copied from interface: IndentationTarget

Returns whether the IndentationEngine is creating a Java interface. Creating an interface means, for example, that method bodies are being suppressed.

Specified by:
isInterface in interface IndentationTarget

indent

public void indent(int pLevel)
            throws java.io.IOException
Description copied from interface: IndentationTarget

Indents the current line by adding blanks for the given indentation level. This method must be called before any of the write(String) or write() methods or following the line terminating write() method.

Specified by:
indent in interface IndentationTarget
Throws:
java.io.IOException

asString

public java.lang.String asString(JavaQName pQName)
Description copied from interface: IndentationTarget

Converts a class name into a string. The string may then be written to the target using write().

Specified by:
asString in interface IndentationTarget

write

public void write(java.lang.String pValue)
           throws java.io.IOException
Description copied from interface: IndentationTarget

Writes a string to the target.

Specified by:
write in interface IndentationTarget
Throws:
java.io.IOException

write

public void write()
           throws java.io.IOException
Description copied from interface: IndentationTarget

Terminates a line in the target.

Specified by:
write in interface IndentationTarget
Throws:
java.io.IOException