|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--xbn.XBNObject | +--xbn.output.Outputter
Optionally output text to a variety of destinations, with configuration.
Source code: Outputter.java
Use this in in any class that implements Debuggable. This Outputter class contains a single OWriter, and a single OConfig.
Fields inherited from class xbn.XBNObject |
bFALSE_IN_PRODUCTION, bTRUE_IN_PRODUCTION, sCNSTR, sES, sLINE_SEP |
Constructor Summary | |
Outputter()
Create an Outputter that does nothing. |
|
Outputter(OWriter o_writer)
Create an Outputter. |
|
Outputter(OWriter o_writer,
OConfig o_config)
Create an Outputter. |
Method Summary | |
void |
actuallyWriteLine(String s_message,
boolean b_useIndent,
boolean b_newLine)
Write a line of output to the destination. |
OConfig |
getOConfig()
Get the OConfig object for direct manipulation. |
OWriter |
getOWriter()
Get the OWriter object for direct manipulation. |
boolean |
isOn()
Is this Outputter actually writing it's output? |
void |
newln()
Write a newline to the destination. |
void |
setOConfig(OConfig o_config)
Define the configuration for this Outputter. |
void |
setOWriter(OWriter o_writer)
Define the destination for output. |
String |
toString()
Get some information about this Ouptutter. |
void |
write(boolean b_useIndent,
String s_message)
Write a line of output to the destination. |
void |
write(String s_message)
Write a line of output. |
void |
writeNoln(boolean b_useIndent,
String s_message)
Write a line of output to the destination. |
void |
writeNoln(String s_message)
Write a line of output to the destination. |
Methods inherited from class xbn.XBNObject |
getXMsgPrefix, sop, sopl, sopl, throwAX, throwAXIfBadStr, throwAXIfNull, throwAXSpoof |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public Outputter()
public Outputter(OWriter o_writer)
public Outputter(OWriter o_writer, OConfig o_config)
Create an Outputter.
o_writer
- Declares the output destination. May not be null. See setOWriter and getOWriter.o_config
- The configuration for this Outputter object. May not be null. See setOConfig and getOConfig.Method Detail |
public final OWriter getOWriter()
Get the OWriter object for direct manipulation.
Set with setOWriter
.
public final OConfig getOConfig()
Get the OConfig object for direct manipulation.
Set with setOConfig
.
public final void setOWriter(OWriter o_writer)
Define the destination for output.
Get with getOWriter
.
o_writer
- Object declaring the output destination. May not be null.public final void setOConfig(OConfig o_config)
Define the configuration for this Outputter.
Get with getOConfig
.
o_config
- The configuration for this Outputter object. May not be null.public final boolean isOn()
Is this Outputter actually writing it's output?
Note that this setting is ignored when the OWriter is not active.
getOConfig().isOn()
public final void write(String s_message)
Write a line of output.
Equal to actuallyWriteLine(s_message, true, true)
public final void writeNoln(String s_message)
Write a line of output to the destination.
Equal to actuallyWriteLine(s_message, false, false)
public final void newln()
Write a newline to the destination.
Equal to actuallyWriteLine(null, false, true)
public final void write(boolean b_useIndent, String s_message)
Write a line of output to the destination.
Equal to actuallyWriteLine(s_message, b_useIndent, true)
public final void writeNoln(boolean b_useIndent, String s_message)
Write a line of output to the destination.
Equal to actuallyWriteLine(s_message, b_useIndent, false)
public void actuallyWriteLine(String s_message, boolean b_useIndent, boolean b_newLine)
Write a line of output to the destination.
In order:
getOWriter.isActive()
or getOConfig().isOn()
equal false, do nothing. DONE.getOWriter().newln()
. DONE.getOConfig().getFormatted(b_useIndent, s_message)
), and then output it via getOWriter().write or getOWriter().writeNoln.s_message
- The message to output.b_useIndent
- Should this line of output be preceded by an indentation? If true, yes, indent. If false, no indent.b_newLine
- If true, output using OWriter.write. If false, use OWriter.writeNoln.public final String toString()
Get some information about this Ouptutter.
toString
in class Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright 1997-2003, Jeff Epstein, All Rights Reserved. See top of source code files for copyright notice.
http://sourceforge.net/projects/xbnjava