|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwt.tools.xref.OutputHelper
This class is a helper class that provides the ability to output information either to the console (the default) or to an output text file, in a hierarchical manner.
Field Summary | |
(package private) int |
d_indentLevel
|
(package private) String |
d_indentString
|
(package private) int |
d_outputLevel
|
(package private) PrintWriter |
d_pw
|
(package private) boolean |
d_specifiedFileName
|
(package private) PrintWriter |
d_stdout
|
Constructor Summary | |
OutputHelper()
When this constructor is used, all output is sent to the console. |
|
OutputHelper(PrintWriter pw)
|
|
OutputHelper(String classInterfaceSpec)
When this constructor is used, all output is sent to an output file based on the specified classInterfaceSpec (i.e. |
Method Summary | |
void |
close()
When the user instantiates with class with the constructor that accepts an outputFileName then this method can be used to close that outputFileName. |
void |
decreaseIndent()
This method decrements the indent level which results in all output via the Log() method to be indented 4 spaces less. |
void |
increaseIndent()
This method increments the indent level which results in all output via the Log() method to be indented another 4 spaces. |
private void |
init()
This convenience method provides a single initialization method for all constructors to call. |
void |
open(String classInterfaceSpec)
This method is used to instantiate a PrintWriter associated with an output file. |
void |
println(String msg)
This method is the output method for this class. |
void |
setOutputLevel(int level)
This method controls how much of the hierarchical information to display. |
void |
updateIndentString()
This method initializes the indent string field based on the contents of the field d_indentLevel. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
PrintWriter d_pw
PrintWriter d_stdout
int d_outputLevel
int d_indentLevel
String d_indentString
boolean d_specifiedFileName
Constructor Detail |
public OutputHelper()
public OutputHelper(PrintWriter pw)
public OutputHelper(String classInterfaceSpec) throws IOException
Method Detail |
public void open(String classInterfaceSpec) throws IOException
IOException
public void close()
private void init()
public void updateIndentString()
public void increaseIndent()
public void decreaseIndent()
public void setOutputLevel(int level)
First Level of information Second Level of information Third level of information Fourth level of information Fifth level of information Sixth level of informationIf with above set of information to display, you call this method with the value 3, then nothing beyond the 3rd level will be output, in other words you would see the following:
First Level of information Second Level of information Third level of informationIf you you want to display everything, then you can just call this method with a large value like 99 or 9999.
public void println(String msg)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |