edu.umd.cs.findbugs

Interface BugReporter

public interface BugReporter extends RepositoryLookupFailureCallback, IClassObserver

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 intNORMAL
Normal error-reporting verbosity level.
static intSILENT
Silent error-reporting verbosity level.
Method Summary
voidaddObserver(BugReporterObserver observer)
Add an observer.
voidfinish()
Finish reporting bugs.
ProjectStatsgetProjectStats()
Get ProjectStats object used to store statistics about the overall project being analyzed.
BugReportergetRealBugReporter()
Get the real bug reporter at the end of a chain of delegating bug reporters.
voidreportBug(BugInstance bugInstance)
Report a bug.
voidreportQueuedErrors()
Report any accumulated error messages.
voidsetErrorVerbosity(int level)
Set the error-reporting verbosity level.
voidsetPriorityThreshold(int threshold)
Set the priority threshold.

Field Detail

NORMAL

public static final int NORMAL
Normal error-reporting verbosity level.

SILENT

public static final int SILENT
Silent error-reporting verbosity level.

Method Detail

addObserver

public void addObserver(BugReporterObserver observer)
Add an observer.

Parameters: observer the observer

finish

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

getProjectStats

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

getRealBugReporter

public BugReporter getRealBugReporter()
Get the real bug reporter at the end of a chain of delegating bug reporters. All non-delegating bug reporters should simply "return this".

Returns: the real bug reporter at the end of the chain, or this object if there is no delegation

reportBug

public 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

reportQueuedErrors

public void reportQueuedErrors()
Report any accumulated error messages.

setErrorVerbosity

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

Parameters: level the verbosity level

setPriorityThreshold

public void setPriorityThreshold(int threshold)
Set the priority threshold.

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

FindBugs™ is licenced under the LGPL. Copyright © 2006 University of Maryland.