|
||||||||||
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 |
---|
Fields inherited from interface edu.umd.cs.findbugs.BugReporter |
---|
NORMAL, SILENT |
Constructor Summary | |
---|---|
AbstractBugReporter()
|
Method Summary | |
---|---|
void |
addObserver(BugReporterObserver observer)
Add an observer. |
protected abstract void |
doReportBug(BugInstance bugInstance)
Subclasses must override this. |
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 performing analysis. |
void |
logError(java.lang.String message,
java.lang.Throwable e)
Log an error that occurs while performing analysis. |
protected void |
notifyObservers(BugInstance bugInstance)
This should be called when a bug is reported by a subclass. |
abstract void |
reportAnalysisError(AnalysisError error)
Report a queued error. |
void |
reportBug(BugInstance bugInstance)
Report a bug. |
void |
reportMissingClass(java.lang.ClassNotFoundException ex)
Called to report a lookup failure. |
abstract void |
reportMissingClass(java.lang.String string)
Report a missing class. |
void |
reportQueuedErrors()
Report any accumulated error messages. |
void |
reportSkippedAnalysis(JavaClassAndMethod method)
Report that we skipped some analysis of a method |
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, getRealBugReporter |
Methods inherited from interface edu.umd.cs.findbugs.ba.ClassObserver |
---|
observeClass |
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 reportSkippedAnalysis(JavaClassAndMethod method)
reportSkippedAnalysis
in interface RepositoryLookupFailureCallback
method
- public void logError(java.lang.String message)
RepositoryLookupFailureCallback
logError
in interface RepositoryLookupFailureCallback
message
- the error messagepublic void logError(java.lang.String message, java.lang.Throwable e)
RepositoryLookupFailureCallback
logError
in interface RepositoryLookupFailureCallback
message
- the error messagee
- the exception which is the underlying cause of the errorpublic 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 reportAnalysisError(AnalysisError error)
error
- the queued errorpublic abstract void reportMissingClass(java.lang.String string)
string
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |