|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.incava.analysis.Report
public abstract class Report
Reports errors (violations), in a format that is determined by the subclass.
Field Summary | |
---|---|
protected java.lang.String |
fileName
The file to which this report currently applies. |
Constructor Summary | |
---|---|
Report(java.io.OutputStream os)
Creates a report for the given output stream. |
|
Report(java.io.OutputStream os,
java.io.File file)
Creates a report for the given output stream, and file. |
|
Report(java.io.OutputStream os,
java.lang.String source)
Creates a report for the given output stream, and string source. |
|
Report(java.io.Writer writer)
Creates a report for the given writer. |
|
Report(java.io.Writer writer,
java.io.File file)
Creates a report for the given writer, and a file source. |
|
Report(java.io.Writer writer,
java.lang.String source)
Creates a report for the given writer, and a string source. |
Method Summary | |
---|---|
void |
addViolation(Violation v)
Adds the given violation. |
void |
flush()
Writes all violations, and clears the list. |
java.util.Set |
getViolations()
Exists only for testing. |
void |
reset(java.io.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(java.lang.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 java.lang.String |
toString(Violation violation)
Returns a string representing the given violation, consistent with the format of the Report subclass. |
protected void |
write(java.lang.String str)
Sends the given string to the writer associated with this Report. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.lang.String fileName
Constructor Detail |
---|
public Report(java.io.Writer writer)
writer
- The writer associated with this report.public Report(java.io.OutputStream os)
os
- The output stream associated with this report.public Report(java.io.Writer writer, java.lang.String source)
writer
- The writer associated with this report.source
- The source code to which this report applies.public Report(java.io.Writer writer, java.io.File file)
writer
- The writer associated with this report.file
- The file, containing source code, to which this report applies.public Report(java.io.OutputStream os, java.lang.String source)
os
- The output stream associated with this report.source
- The source code to which this report applies.public Report(java.io.OutputStream os, java.io.File file)
os
- The output stream associated with this report.file
- The file, containing source code, to which this report applies.Method Detail |
---|
public void reset(java.io.File file)
flush
.
file
- The file associated with the set of violations.public void reset(java.lang.String source)
flush
.
source
- The source code associated with the set of violations.public void flush()
public void addViolation(Violation v)
v
- The violation being added.public java.util.Set getViolations()
protected abstract java.lang.String toString(Violation violation)
violation
- The violation to represent as a string.protected void write(java.lang.String str)
str
- The string to be written.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |