public class TOFWriter
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected int |
indention |
protected LookupDatabase |
lookup |
protected boolean |
noPointers |
protected java.io.PrintWriter |
outie |
protected boolean |
outputReadOnlyFields |
protected boolean |
prettyPrint |
protected ReferenceMap |
references |
| Constructor and Description |
|---|
TOFWriter(java.io.OutputStream ostream)
Creates a prettyprinting TOFWriter that writes to the given OutputStream.
|
TOFWriter(java.io.OutputStream ostream,
LookupDatabase lookup)
Creates a prettyprinting TOFWriter that writes to the given OutputStream.
|
TOFWriter(java.io.Writer writer)
Creates a prettyprinting TOFWriter that writes to the given writer.
|
TOFWriter(java.io.Writer writer,
LookupDatabase lookup)
Creates a prettyprinting TOFWriter that writes to the given writer.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes the stream.
|
boolean |
getNoPointers() |
boolean |
getOutputReadOnlyFields()
If true, writer also outputs read-only fields from beans and records.
|
protected void |
indent()
Increases indention level by one.
|
boolean |
isPrettyPrinting()
True if writer is prettyprinting.
|
protected void |
newLine()
Utility method; prints a newline and appropriate indention.
|
void |
setNoPointers(boolean tizit) |
void |
setOutputReadOnlyFields(boolean tizit) |
void |
setPrettyPrinting(boolean prettyPrint)
Turns prettyprinting on or off.
|
protected void |
undent()
Decreases indention level by one.
|
protected void |
writeArrayList(java.util.ArrayList victim) |
protected void |
writeBean(java.lang.Object victim) |
protected void |
writeCharacter(java.lang.Character carrie)
Writes a single character.
|
protected void |
writeClass(java.lang.Class victim) |
protected void |
writeCog(Cog cog) |
protected void |
writeComplexObject(java.lang.Object object)
Defines a reference and a complex object.
|
protected void |
writeLookup(java.lang.Object object)
Writes a lookup reference to an object.
|
protected void |
writeMap(java.util.Map victim) |
protected void |
writeNumber(java.lang.Number numb)
Writes a Number.
|
void |
writeObject(java.lang.Object object)
Writes an object to the stream.
|
protected void |
writeObjectImpl(java.lang.Object object)
Writes an object without any prettyprint returns.
|
protected void |
writeRecord(Record victim) |
protected void |
writeSet(java.util.Set victim) |
protected void |
writeString(java.lang.String stringy)
Writes a String.
|
protected boolean prettyPrint
protected java.io.PrintWriter outie
protected int indention
protected ReferenceMap references
protected LookupDatabase lookup
protected boolean outputReadOnlyFields
protected boolean noPointers
public TOFWriter(java.io.Writer writer)
public TOFWriter(java.io.OutputStream ostream)
public TOFWriter(java.io.Writer writer,
LookupDatabase lookup)
public TOFWriter(java.io.OutputStream ostream,
LookupDatabase lookup)
public void setPrettyPrinting(boolean prettyPrint)
public boolean isPrettyPrinting()
public boolean getOutputReadOnlyFields()
public void setOutputReadOnlyFields(boolean tizit)
public boolean getNoPointers()
public void setNoPointers(boolean tizit)
public void writeObject(java.lang.Object object)
throws java.io.IOException
java.io.IOExceptionpublic void close()
throws java.io.IOException
java.io.IOExceptionprotected void writeObjectImpl(java.lang.Object object)
throws java.io.IOException
java.io.IOExceptionprotected void writeCog(Cog cog) throws java.io.IOException
java.io.IOExceptionprotected void writeLookup(java.lang.Object object)
throws java.io.IOException
java.io.IOExceptionprotected void writeComplexObject(java.lang.Object object)
throws java.io.IOException
java.io.IOExceptionprotected void newLine()
protected void indent()
protected void undent()
protected void writeCharacter(java.lang.Character carrie)
throws java.io.IOException
java.io.IOExceptionprotected void writeNumber(java.lang.Number numb)
throws java.io.IOException
java.io.IOExceptionprotected void writeString(java.lang.String stringy)
throws java.io.IOException
java.io.IOExceptionprotected void writeArrayList(java.util.ArrayList victim)
throws java.io.IOException
java.io.IOExceptionprotected void writeSet(java.util.Set victim)
throws java.io.IOException
java.io.IOExceptionprotected void writeMap(java.util.Map victim)
throws java.io.IOException
java.io.IOExceptionprotected void writeClass(java.lang.Class victim)
throws java.io.IOException
java.io.IOExceptionprotected void writeRecord(Record victim) throws java.io.IOException
java.io.IOExceptionprotected void writeBean(java.lang.Object victim)
throws java.io.IOException
java.io.IOException