|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.umd.cs.findbugs.AbstractBugReporter
public abstract class AbstractBugReporter
An abstract class which provides much of the functionality required of all BugReporter objects.
Field Summary | |
---|---|
private FindBugs |
engine
|
private java.util.LinkedList<java.lang.String> |
errorMessageList
|
private java.util.LinkedList<java.lang.String> |
missingClassMessageList
|
private java.util.HashSet<java.lang.String> |
missingClassMessageSet
|
private java.util.List<BugReporterObserver> |
observerList
|
private int |
priorityThreshold
|
private ProjectStats |
projectStats
|
private int |
verbosityLevel
|
Fields inherited from interface edu.umd.cs.findbugs.BugReporter |
---|
NORMAL, SILENT |
Constructor Summary | |
---|---|
AbstractBugReporter()
|
Method Summary | |
---|---|
void |
addObserver(BugReporterObserver observer)
Add an observer. |
abstract void |
beginReport()
|
protected abstract void |
doReportBug(BugInstance bugInstance)
Subclasses must override this. |
abstract void |
endReport()
|
FindBugs |
getEngine()
|
static java.lang.String |
getMissingClassName(java.lang.ClassNotFoundException ex)
|
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. |
protected void |
notifyObservers(BugInstance bugInstance)
This should be called when a bug is reported by a subclass. |
void |
reportBug(BugInstance bugInstance)
Report a bug. |
abstract void |
reportLine(java.lang.String msg)
|
void |
reportMissingClass(java.lang.ClassNotFoundException ex)
Called to report a lookup failure. |
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 class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface edu.umd.cs.findbugs.BugReporter |
---|
finish |
Methods inherited from interface edu.umd.cs.findbugs.ba.ClassObserver |
---|
observeClass |
Field Detail |
---|
private FindBugs engine
private int verbosityLevel
private int priorityThreshold
private java.util.HashSet<java.lang.String> missingClassMessageSet
private java.util.LinkedList<java.lang.String> missingClassMessageList
private java.util.LinkedList<java.lang.String> errorMessageList
private java.util.List<BugReporterObserver> observerList
private ProjectStats projectStats
Constructor Detail |
---|
public AbstractBugReporter()
Method Detail |
---|
public void setEngine(FindBugs engine)
BugReporter
setEngine
in interface BugReporter
engine
- the FindBugs engine objectpublic FindBugs getEngine()
public void setErrorVerbosity(int level)
BugReporter
setErrorVerbosity
in interface BugReporter
level
- the verbosity levelpublic void setPriorityThreshold(int threshold)
BugReporter
setPriorityThreshold
in interface BugReporter
threshold
- bug instances must be at least as important as
this priority to be reportedpublic final void reportBug(BugInstance bugInstance)
BugReporter
reportBug
in interface BugReporter
bugInstance
- object describing the bug instancepublic static java.lang.String getMissingClassName(java.lang.ClassNotFoundException ex)
public void reportMissingClass(java.lang.ClassNotFoundException ex)
RepositoryLookupFailureCallback
reportMissingClass
in interface RepositoryLookupFailureCallback
ex
- a ClassNotFoundException resulting from the failurepublic void logError(java.lang.String message)
BugReporter
logError
in interface BugReporter
message
- the error messagepublic void reportQueuedErrors()
BugReporter
reportQueuedErrors
in interface BugReporter
public void addObserver(BugReporterObserver observer)
BugReporter
addObserver
in interface BugReporter
observer
- the observerpublic ProjectStats getProjectStats()
BugReporter
getProjectStats
in interface BugReporter
protected void notifyObservers(BugInstance bugInstance)
protected abstract void doReportBug(BugInstance bugInstance)
public abstract void beginReport()
public abstract void reportLine(java.lang.String msg)
public abstract void endReport()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |