org.incava.analysis

Class TerseReport


public class TerseReport
extends Report

Reports errors in a single line, AKA the format expected by Emacs (!c).

Field Summary

Fields inherited from class org.incava.analysis.Report

fileName

Constructor Summary

TerseReport(OutputStream os)
Creates a terse report for the given output stream.
TerseReport(OutputStream os, File file)
Creates a terse report for the given output stream, and file.
TerseReport(OutputStream os, String source)
Creates a terse report for the given output stream, and string source.
TerseReport(Writer writer)
Creates a terse report for the given writer.
TerseReport(Writer writer, File file)
Creates a terse report for the given writer, and a file source.
TerseReport(Writer writer, String source)
Creates a terse report for the given writer, and a string source.

Method Summary

protected String
toString(Violation violation)
Returns the given violation, in single-line format.

Methods inherited from class org.incava.analysis.Report

addViolation, flush, getViolations, reset, reset, toString, write

Constructor Details

TerseReport

public TerseReport(OutputStream os)
Creates a terse report for the given output stream.
Parameters:
os - The output stream associated with this report.

TerseReport

public TerseReport(OutputStream os,
                   File file)
Creates a terse report for the given output stream, and file.
Parameters:
os - The output stream associated with this report.
file - The file, containing source code, to which this report applies.

TerseReport

public TerseReport(OutputStream os,
                   String source)
Creates a terse report for the given output stream, and string source.
Parameters:
os - The output stream associated with this report.
source - The source code to which this report applies.

TerseReport

public TerseReport(Writer writer)
Creates a terse report for the given writer.
Parameters:
writer - The writer associated with this report.

TerseReport

public TerseReport(Writer writer,
                   File file)
Creates a terse report for the given writer, and a file source.
Parameters:
writer - The writer associated with this report.
file - The file, containing source code, to which this report applies.

TerseReport

public TerseReport(Writer writer,
                   String source)
Creates a terse report for the given writer, and a string source.
Parameters:
writer - The writer associated with this report.
source - The source code to which this report applies.

Method Details

toString

protected String toString(Violation violation)
Returns the given violation, in single-line format. For example:
     TerseReport.java:77:22:77:29: Undocumented protected method
 
Overrides:
toString in interface Report
Parameters:
violation - The violation to represent as a single-line violation.
Returns:
The violation, in single-line format.