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)
OutputReporterstart in interface OutputReporterannouncements - header information about validator operation;
plain text, one line per elementpublic void end()
OutputReporterend in interface OutputReporterpublic void startSection(String scode, String message)
OutputReporterstartSection in interface OutputReporterscode - short fixed-length (3-char?) identifier for the
section about to startmessage - terse (one-line) free-text description of the stagepublic String getSectionCode()
OutputReportergetSectionCode in interface OutputReporterpublic void summariseUnreportedMessages(String scode)
OutputReportersummariseUnreportedMessages in interface OutputReporterscode - section code to summarise;
if null, no stage filtering is donepublic void endSection()
OutputReporterendSection in interface OutputReporterpublic void report(ReportCode code, String message)
ReporterThis convenience method is equivalent to calling
report(code,message,null)
public void report(ReportCode code, String message, Throwable err)
ReporterCopyright © 2025 Central Laboratory of the Research Councils. All Rights Reserved.