| java.lang.Object org.incava.analysis.Report
All known Subclasses: org.incava.analysis.ContextReport, org.incava.analysis.TerseReport,
Report | abstract public class Report (Code) | | Reports errors (violations), in a format that is determined by the subclass.
|
Field Summary | |
protected String | fileName The file to which this report currently applies. |
Constructor Summary | |
public | Report(Writer writer) Creates a report for the given writer. | public | Report(OutputStream os) Creates a report for the given output stream. | public | Report(Writer writer, String source) Creates a report for the given writer, and a string source. | public | Report(Writer writer, File file) Creates a report for the given writer, and a file source. | public | Report(OutputStream os, String source) Creates a report for the given output stream, and string source. | public | Report(OutputStream os, File file) Creates a report for the given output stream, and file. |
Method Summary | |
public void | addViolation(Violation v) Adds the given violation. | public void | flush() Writes all violations, and clears the list. | public Set | getViolations() Exists only for testing. | public 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 . | public 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 . | abstract protected 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. |
fileName | protected String fileName(Code) | | The file to which this report currently applies. By default, this is '-',
denoting standard output.
|
Report | public Report(Writer writer)(Code) | | Creates a report for the given writer.
Parameters: writer - The writer associated with this report. |
Report | public Report(OutputStream os)(Code) | | Creates a report for the given output stream.
Parameters: os - The output stream associated with this report. |
Report | public Report(Writer writer, String source)(Code) | | Creates a report for the given writer, and a string source.
Parameters: writer - The writer associated with this report. Parameters: source - The source code to which this report applies. |
Report | public Report(Writer writer, File file)(Code) | | Creates a report for the given writer, and a file source.
Parameters: writer - The writer associated with this report. Parameters: file - The file, containing source code, to which this report applies. |
Report | public Report(OutputStream os, String source)(Code) | | Creates a report for the given output stream, and string source.
Parameters: os - The output stream associated with this report. Parameters: source - The source code to which this report applies. |
Report | public Report(OutputStream os, File file)(Code) | | Creates a report for the given output stream, and file.
Parameters: os - The output stream associated with this report. Parameters: file - The file, containing source code, to which this report applies. |
addViolation | public void addViolation(Violation v)(Code) | | Adds the given violation.
Parameters: v - The violation being added. |
flush | public void flush()(Code) | | Writes all violations, and clears the list.
|
getViolations | public Set getViolations()(Code) | | Exists only for testing.
|
reset | public void reset(File file)(Code) | | Associates the given file with the list of violations, including that are
adding to this report later, i.e., prior to flush .
Parameters: file - The file associated with the set of violations. |
reset | public void reset(String source)(Code) | | Associates the given string source with the list of violations, including
that are adding to this report later, i.e., prior to flush .
Parameters: source - The source code associated with the set of violations. |
toString | abstract protected String toString(Violation violation)(Code) | | Returns a string representing the given violation, consistent with the
format of the Report subclass.
Parameters: violation - The violation to represent as a string. |
write | protected void write(String str)(Code) | | Sends the given string to the writer associated with this Report.
Parameters: str - The string to be written. |
|
|