org.incava.analysis
public abstract class Report extends Object
Field Summary | |
---|---|
protected String | fileName
The file to which this report currently applies. |
Constructor Summary | |
---|---|
Report(Writer writer)
Creates a report for the given writer.
| |
Report(OutputStream os)
Creates a report for the given output stream.
| |
Report(Writer writer, String source)
Creates a report for the given writer, and a string source.
| |
Report(Writer writer, File file)
Creates a report for the given writer, and a file source.
| |
Report(OutputStream os, String source)
Creates a report for the given output stream, and string source.
| |
Report(OutputStream os, File file)
Creates a report for the given output stream, and file.
|
Method Summary | |
---|---|
void | addViolation(Violation v)
Adds the given violation.
|
void | flush()
Writes all violations, and clears the list. |
Set | getViolations()
Exists only for testing. |
void | reset(File file)
Associates the given file with the list of violations, including that are
adding to this report later, i.e., prior to flush .
|
void | reset(String source)
Associates the given string source with the list of violations, including
that are adding to this report later, i.e., prior to flush .
|
protected abstract String | toString(Violation violation)
Returns a string representing the given violation, consistent with the
format of the Report subclass.
|
protected void | write(String str)
Sends the given string to the writer associated with this Report.
|
Parameters: writer The writer associated with this report.
Parameters: os The output stream associated with this report.
Parameters: writer The writer associated with this report. source The source code to which this report applies.
Parameters: writer The writer associated with this report. file The file, containing source code, to which this report applies.
Parameters: os The output stream associated with this report. source The source code to which this report applies.
Parameters: os The output stream associated with this report. file The file, containing source code, to which this report applies.
Parameters: v The violation being added.
flush
.
Parameters: file The file associated with the set of violations.
flush
.
Parameters: source The source code associated with the set of violations.
Parameters: violation The violation to represent as a string.
Parameters: str The string to be written.