org.incava.analysis
Class TerseReport

java.lang.Object
  extended by org.incava.analysis.Report
      extended by org.incava.analysis.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(java.io.OutputStream os)
          Creates a terse report for the given output stream.
TerseReport(java.io.OutputStream os, java.io.File file)
          Creates a terse report for the given output stream, and file.
TerseReport(java.io.OutputStream os, java.lang.String source)
          Creates a terse report for the given output stream, and string source.
TerseReport(java.io.Writer writer)
          Creates a terse report for the given writer.
TerseReport(java.io.Writer writer, java.io.File file)
          Creates a terse report for the given writer, and a file source.
TerseReport(java.io.Writer writer, java.lang.String source)
          Creates a terse report for the given writer, and a string source.
 
Method Summary
protected  java.lang.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, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TerseReport

public TerseReport(java.io.Writer writer)
Creates a terse report for the given writer.

Parameters:
writer - The writer associated with this report.

TerseReport

public TerseReport(java.io.OutputStream os)
Creates a terse report for the given output stream.

Parameters:
os - The output stream associated with this report.

TerseReport

public TerseReport(java.io.Writer writer,
                   java.lang.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.

TerseReport

public TerseReport(java.io.Writer writer,
                   java.io.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(java.io.OutputStream os,
                   java.lang.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(java.io.OutputStream os,
                   java.io.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.
Method Detail

toString

protected java.lang.String toString(Violation violation)
Returns the given violation, in single-line format. For example:
     TerseReport.java:77:22:77:29: Undocumented protected method
 

Specified by:
toString in class Report
Parameters:
violation - The violation to represent as a single-line violation.
Returns:
The violation, in single-line format.