edu.umd.cs.findbugs
Interface BugReporter

All Superinterfaces:
ClassObserver, RepositoryLookupFailureCallback
All Known Implementing Classes:
AbstractBugReporter, AnalysisRun.Reporter, BugCollectionBugReporter, DelegatingBugReporter, EmacsBugReporter, FilterBugReporter, FindBugs.CategoryFilteringBugReporter, FindBugs.ErrorCountingBugReporter, HTMLBugReporter, PrintingBugReporter, SortingBugReporter, TextUIBugReporter, XDocsBugReporter, XMLBugReporter

public interface BugReporter
extends RepositoryLookupFailureCallback, ClassObserver

Generic interface for bug reporter objects. A BugReporter accumulates all of the information reported by the analyses, which includes bug reports, and also auxiliary information such as analysis errors, missing classes, and class to source file mapping.

Author:
David Hovemeyer

Field Summary
static int NORMAL
          Normal error-reporting verbosity level.
static int SILENT
          Silent error-reporting verbosity level.
 
Method Summary
 void addObserver(BugReporterObserver observer)
          Add an observer.
 void finish()
          Finish reporting bugs.
 ProjectStats getProjectStats()
          Get ProjectStats object used to store statistics about the overall project being analyzed.
 void logError(java.lang.String message)
          Log an error that occurs while looking for bugs.
 void reportBug(BugInstance bugInstance)
          Report a bug.
 void reportQueuedErrors()
          Report any accumulated error messages.
 void setEngine(FindBugs engine)
          Called to give the BugReporter a reference to the FindBugs engine object.
 void setErrorVerbosity(int level)
          Set the error-reporting verbosity level.
 void setPriorityThreshold(int threshold)
          Set the priority threshold.
 
Methods inherited from interface edu.umd.cs.findbugs.ba.RepositoryLookupFailureCallback
reportMissingClass
 
Methods inherited from interface edu.umd.cs.findbugs.ba.ClassObserver
observeClass
 

Field Detail

SILENT

static final int SILENT
Silent error-reporting verbosity level.

See Also:
Constant Field Values

NORMAL

static final int NORMAL
Normal error-reporting verbosity level.

See Also:
Constant Field Values
Method Detail

setEngine

void setEngine(FindBugs engine)
Called to give the BugReporter a reference to the FindBugs engine object.

Parameters:
engine - the FindBugs engine object

setErrorVerbosity

void setErrorVerbosity(int level)
Set the error-reporting verbosity level.

Parameters:
level - the verbosity level

setPriorityThreshold

void setPriorityThreshold(int threshold)
Set the priority threshold.

Parameters:
threshold - bug instances must be at least as important as this priority to be reported

reportBug

void reportBug(BugInstance bugInstance)
Report a bug. The implementation may report the bug immediately, or queue it for later.

Parameters:
bugInstance - object describing the bug instance

logError

void logError(java.lang.String message)
Log an error that occurs while looking for bugs.

Parameters:
message - the error message

finish

void finish()
Finish reporting bugs. If any bug reports have been queued, calling this method will flush them.


reportQueuedErrors

void reportQueuedErrors()
Report any accumulated error messages.


addObserver

void addObserver(BugReporterObserver observer)
Add an observer.

Parameters:
observer - the observer

getProjectStats

ProjectStats getProjectStats()
Get ProjectStats object used to store statistics about the overall project being analyzed.