|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object frysk.rsl.Printer
public final class Printer
Class for accumulating and then displaying log messages.
Field Summary | |
---|---|
private PrintWriter |
out
|
private static long |
startTime
|
Constructor Summary | |
---|---|
Printer(PrintWriter out)
Start with this single printer, will eventually need to make things more complex with sub-classes. |
Method Summary | |
---|---|
private void |
dump(boolean b)
|
private void |
dump(boolean[] a)
|
private void |
dump(char c)
|
private void |
dump(char[] a)
|
private void |
dump(int i)
|
private void |
dump(int[] a)
|
private void |
dump(long l)
|
private void |
dump(long[] a)
|
private void |
dump(Object o)
|
private void |
dump(Object o,
int i)
Dump the array object's i'th element |
private void |
dump(String s)
|
private void |
dump(Throwable t)
Throwables get their message printed; along with any root causes. |
Printer |
prefix(Log logger)
|
Printer |
prefix(Log logger,
Object o)
|
private void |
prefixTimeAndPid(Level level)
|
Printer |
print(boolean b)
Booleans are printed as strings. |
Printer |
print(char c)
Chars are printed in quotes. |
Printer |
print(int i)
Integers are printed in decimal. |
Printer |
print(long l)
Longs are printed in hex. |
Printer |
print(Object o)
Use poorly implemented reflection to dump Objects. |
Printer |
print(String s)
Strings are just copied. |
void |
suffix()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private final PrintWriter out
private static final long startTime
Constructor Detail |
---|
Printer(PrintWriter out)
Method Detail |
---|
private void prefixTimeAndPid(Level level)
public Printer prefix(Log logger)
public Printer prefix(Log logger, Object o)
public void suffix()
public Printer print(Object o)
private void dump(Object o)
private void dump(Throwable t)
private void dump(String s)
private void dump(Object o, int i)
o
- the array objecti
- the array indexpublic Printer print(boolean b)
private void dump(boolean b)
private void dump(boolean[] a)
public Printer print(char c)
private void dump(char c)
private void dump(char[] a)
public Printer print(int i)
private void dump(int i)
private void dump(int[] a)
public Printer print(long l)
private void dump(long l)
private void dump(long[] a)
public Printer print(String s)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |