edu.umd.cs.findbugs

Class AbstractBugReporter

public abstract class AbstractBugReporter extends Object implements BugReporter

An abstract class which provides much of the functionality required of all BugReporter objects.
Method Summary
voidaddObserver(BugReporterObserver observer)
protected abstract voiddoReportBug(BugInstance bugInstance)
Subclasses must override this.
static StringgetMissingClassName(ClassNotFoundException ex)
ProjectStatsgetProjectStats()
voidlogError(String message)
voidlogError(String message, Throwable e)
protected voidnotifyObservers(BugInstance bugInstance)
This should be called when a bug is reported by a subclass.
abstract voidreportAnalysisError(AnalysisError error)
Report a queued error.
voidreportBug(BugInstance bugInstance)
voidreportMissingClass(ClassNotFoundException ex)
voidreportMissingClass(ClassDescriptor classDescriptor)
abstract voidreportMissingClass(String string)
Report a missing class.
voidreportQueuedErrors()
voidreportSkippedAnalysis(MethodDescriptor method)
Report that we skipped some analysis of a method
voidsetErrorVerbosity(int level)
voidsetPriorityThreshold(int threshold)

Method Detail

addObserver

public void addObserver(BugReporterObserver observer)

doReportBug

protected abstract void doReportBug(BugInstance bugInstance)
Subclasses must override this. It will be called only for bugs which meet the priority threshold.

Parameters: bugInstance the bug to report

getMissingClassName

public static String getMissingClassName(ClassNotFoundException ex)

getProjectStats

public ProjectStats getProjectStats()

logError

public void logError(String message)

logError

public void logError(String message, Throwable e)

notifyObservers

protected void notifyObservers(BugInstance bugInstance)
This should be called when a bug is reported by a subclass.

Parameters: bugInstance the bug to inform observers of

reportAnalysisError

public abstract void reportAnalysisError(AnalysisError error)
Report a queued error.

Parameters: error the queued error

reportBug

public final void reportBug(BugInstance bugInstance)

reportMissingClass

public void reportMissingClass(ClassNotFoundException ex)

reportMissingClass

public void reportMissingClass(ClassDescriptor classDescriptor)

reportMissingClass

public abstract void reportMissingClass(String string)
Report a missing class.

Parameters: string the name of the class

reportQueuedErrors

public void reportQueuedErrors()

reportSkippedAnalysis

public void reportSkippedAnalysis(MethodDescriptor method)
Report that we skipped some analysis of a method

Parameters: method

setErrorVerbosity

public void setErrorVerbosity(int level)

setPriorityThreshold

public void setPriorityThreshold(int threshold)
FindBugs™ is licenced under the LGPL. Copyright © 2006 University of Maryland.