jpos.util
Class Tracer
java.lang.Object
|
+--jpos.util.Tracer
- public class Tracer
- extends java.lang.Object
Tracing class to help in the debugging of the JCL and JavaPOS controls
NOTE: this class is a Singleton (see GoF Design Pattern book)
access the sole instance by doing: Tracer.getInstance() call
NOTE2: Will allow (in the future) the option of defining different
ouput for the tracer (1.3 version)
- Since:
- 1.2 (NY 2K meeting)
- Author:
- E. Michael Maximilien (maxim@us.ibm.com)
- See Also:
getInstance()
Method Summary |
static Tracer |
getInstance()
|
boolean |
isOn()
|
void |
print(java.lang.String s)
Prints a string appended without a new line to the tracer output |
void |
println(java.lang.String s)
Prints a string appended with a new line to the tracer output |
void |
setOn(boolean b)
Sets this tracer ON or OFF |
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
getInstance
public static Tracer getInstance()
- Returns:
- the sole instance of this class (creating it if necessary)
- Since:
- 1.2 (NY 2K meeting)
println
public void println(java.lang.String s)
- Prints a string appended with a new line to the tracer output
- Parameters:
s
- the String to print
print
public void print(java.lang.String s)
- Prints a string appended without a new line to the tracer output
- Parameters:
s
- the String to print
setOn
public void setOn(boolean b)
- Sets this tracer ON or OFF
- Parameters:
b
- the boolean parameter- Since:
- 1.2 (NY 2K meeting)
isOn
public boolean isOn()
- Returns:
- true if the tracer is ON (i.e. enabled)
- Since:
- 1.2 (NY 2K meeting)
This API and code belongs to the JavaPOS committee please see LISCENCE file for details