public class TextOutputReporter extends Object implements OutputReporter
Constructor and Description |
---|
TextOutputReporter(PrintStream out,
ReportType[] types,
int maxRepeat,
boolean debug,
int maxChar)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
end()
Signals end of reporting.
|
void |
endSection()
Ends the current section.
|
String |
getSectionCode()
Returns the section code for the most recently-started section.
|
void |
report(ReportCode code,
String message)
Reports a message.
|
void |
report(ReportCode code,
String message,
Throwable err)
Reports a message with an associated throwable.
|
void |
start(String[] announcements)
Signals beginning of reporting.
|
void |
startSection(String scode,
String message)
Begins a reporting section.
|
void |
summariseUnreportedMessages(String scode)
Writes to the output stream a summary of messages which were
suppressed in a given stage because the maximum repeat count
was exceeded.
|
public TextOutputReporter(PrintStream out, ReportType[] types, int maxRepeat, boolean debug, int maxChar)
out
- destination streamtypes
- message types to report; others are discardedmaxRepeat
- maximum number of times any given message
may be repeated; subsequent instances are suppresseddebug
- true iff you want to see full stacktraces for
exceptions etcmaxChar
- maximum number of total characters per line of outputpublic void start(String[] announcements)
OutputReporter
start
in interface OutputReporter
announcements
- header information about validator operation;
plain text, one line per elementpublic void end()
OutputReporter
end
in interface OutputReporter
public void startSection(String scode, String message)
OutputReporter
startSection
in interface OutputReporter
scode
- short fixed-length (3-char?) identifier for the
section about to startmessage
- terse (one-line) free-text description of the stagepublic String getSectionCode()
OutputReporter
getSectionCode
in interface OutputReporter
public void summariseUnreportedMessages(String scode)
OutputReporter
summariseUnreportedMessages
in interface OutputReporter
scode
- section code to summarise;
if null, no stage filtering is donepublic void endSection()
OutputReporter
endSection
in interface OutputReporter
public void report(ReportCode code, String message)
Reporter
This convenience method is equivalent to calling
report(code,message,null)
public void report(ReportCode code, String message, Throwable err)
Reporter
Copyright © 2024 Central Laboratory of the Research Councils. All Rights Reserved.