|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.e2etrace.formatter.AbstractTraceFormatter
public abstract class AbstractTraceFormatter
Base class for trace formatters.
This class provides the logic for traversing a tree of trace steps. For each
step the call-back formatSingleStep is invoked and the result
written to the output stream. Additionally, formatHeader and
formatFooter are invoked to generate formatter header and
footer information.
| Constructor Summary | |
|---|---|
protected |
AbstractTraceFormatter()
Default constructor. |
| Method Summary | |
|---|---|
void |
format(ITraceSession session,
Writer toWriter)
Generate a formatted output for the supplied trace session. |
protected abstract String |
formatSingleStep(ITraceStep step,
int level)
CALL-BACK: Generate formatted output for a single trace step. |
protected String |
getNewLine()
Returns the platform dependent newline character(s). |
protected abstract void |
writeFooter(ITraceSession session,
Writer toWriter)
CALL-BACK: Write the footer of the trace output. |
protected abstract void |
writeHeader(ITraceSession session,
Writer toWriter)
CALL-BACK: Write the header of the trace output. |
protected void |
writeSteps(ITraceStep step,
Writer toWriter,
int level)
Writes output of a trace step using a given call level and forwards the call to all child steps. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected AbstractTraceFormatter()
| Method Detail |
|---|
protected abstract String formatSingleStep(ITraceStep step,
int level)
step - trace steplevel - current call level (starting with 0)
public void format(ITraceSession session,
Writer toWriter)
throws IOException
format in interface ITraceFormattersession - trace sessiontoWriter - Writer to send the output to
IOException - A problem occured sending the output to toWriterprotected String getNewLine()
protected abstract void writeFooter(ITraceSession session,
Writer toWriter)
throws IOException
session - trace sessiontoWriter - output writer
IOException - A problem occured sending the output to toWriter
protected abstract void writeHeader(ITraceSession session,
Writer toWriter)
throws IOException
session - trace sessiontoWriter - output writer
IOException - A problem occured sending the output to toWriter
protected void writeSteps(ITraceStep step,
Writer toWriter,
int level)
throws IOException
step - current steptoWriter - toWriter Writer to send the output tolevel - current call level (starting with 0)
IOException - A problem occured sending the output to toWriter
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||