public class DelegatingBugReporter extends Object implements BugReporter
NORMAL, SILENT
Constructor and Description |
---|
DelegatingBugReporter(BugReporter delegate)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addObserver(BugReporterObserver observer)
Add an observer.
|
void |
finish()
Finish reporting bugs.
|
BugCollection |
getBugCollection()
Get the bug collection (if any) associated with this bug reporter
|
protected BugReporter |
getDelegate() |
ProjectStats |
getProjectStats()
Get ProjectStats object used to store statistics about the overall
project being analyzed.
|
void |
logError(String message)
Log an error that occurs while performing analysis.
|
void |
logError(String message,
Throwable e)
Log an error that occurs while performing analysis.
|
void |
observeClass(ClassDescriptor classDescriptor)
Observe a class being visited.
|
void |
reportBug(BugInstance bugInstance)
Report a bug.
|
void |
reportMissingClass(ClassDescriptor classDescriptor)
Called to report a class lookup failure.
|
void |
reportMissingClass(ClassNotFoundException ex)
Called to report a class lookup failure.
|
void |
reportQueuedErrors()
Report any accumulated error messages.
|
void |
reportSkippedAnalysis(MethodDescriptor method)
Report that we skipped some analysis of a method
|
void |
setErrorVerbosity(int level)
Set the error-reporting verbosity level.
|
void |
setPriorityThreshold(int threshold)
Set the priority threshold.
|
public DelegatingBugReporter(BugReporter delegate)
delegate
- another BugReporter to delegate all BugReporter methods toprotected BugReporter getDelegate()
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 void observeClass(ClassDescriptor classDescriptor)
IClassObserver
observeClass
in interface IClassObserver
classDescriptor
- class being visitedpublic void reportBug(@Nonnull BugInstance bugInstance)
BugReporter
reportBug
in interface BugReporter
bugInstance
- object describing the bug instancepublic void logError(String message)
IErrorLogger
logError
in interface IErrorLogger
message
- the error messagepublic void reportMissingClass(ClassNotFoundException ex)
IErrorLogger
reportMissingClass
in interface IErrorLogger
ex
- a ClassNotFoundException resulting from the class lookup
failurepublic void reportMissingClass(ClassDescriptor classDescriptor)
IErrorLogger
reportMissingClass
in interface IErrorLogger
classDescriptor
- ClassDescriptor of a missing classpublic void finish()
BugReporter
finish
in interface BugReporter
public 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
public void logError(String message, Throwable e)
IErrorLogger
logError
in interface IErrorLogger
message
- the error messagee
- the exception which is the underlying cause of the errorpublic void reportSkippedAnalysis(MethodDescriptor method)
reportSkippedAnalysis
in interface IErrorLogger
method
- @CheckForNull public BugCollection getBugCollection()
BugReporter
getBugCollection
in interface BugReporter
Copyright © 2003–2015. All rights reserved.