Class DelegatingBugReporter
java.lang.Object
edu.umd.cs.findbugs.DelegatingBugReporter
- All Implemented Interfaces:
RepositoryLookupFailureCallback, BugReporter, IClassObserver, IErrorLogger
- Direct Known Subclasses:
BugReporterDecorator, CategoryFilteringBugReporter, ErrorCountingBugReporter, ExcludingHashesBugReporter, FilterBugReporter
A BugReporter which delegates all method calls to another BugReporter. This
is useful for customizing the behavior of another bug reporter.
-
Field Summary
FieldsFields inherited from interface BugReporter
NORMAL, SILENT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddObserver(BugReporterObserver observer) Add an observer.voidfinish()Finish reporting bugs.Get the bug collection (if any) associated with this bug reporterprotected BugReporterGet ProjectStats object used to store statistics about the overall project being analyzed.voidLog an error that occurs while performing analysis.voidLog an error that occurs while performing analysis.voidobserveClass(ClassDescriptor classDescriptor) Observe a class being visited.voidreportBug(BugInstance bugInstance) Report a bug.voidreportMissingClass(ClassDescriptor classDescriptor) Called to report a class lookup failure.voidCalled to report a class lookup failure.voidReport any accumulated error messages.voidReport that we skipped some analysis of a methodvoidsetErrorVerbosity(int level) Set the error-reporting verbosity level.voidsetPriorityAdjuster(PriorityAdjuster priorityAdjuster) Set an optional priority adjuster.voidsetPriorityThreshold(int threshold) Set the priority threshold.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface IErrorLogger
reportMissingClass
-
Field Details
-
delegate
-
-
Constructor Details
-
DelegatingBugReporter
Constructor.- Parameters:
delegate- another BugReporter to delegate all BugReporter methods to
-
-
Method Details
-
getDelegate
-
setErrorVerbosity
public void setErrorVerbosity(int level) Description copied from interface:BugReporterSet the error-reporting verbosity level.- Specified by:
setErrorVerbosityin interfaceBugReporter- Parameters:
level- the verbosity level
-
setPriorityThreshold
public void setPriorityThreshold(int threshold) Description copied from interface:BugReporterSet the priority threshold.- Specified by:
setPriorityThresholdin interfaceBugReporter- Parameters:
threshold- bug instances must be at least as important as this priority to be reported
-
setPriorityAdjuster
Description copied from interface:BugReporterSet an optional priority adjuster.- Specified by:
setPriorityAdjusterin interfaceBugReporter- Parameters:
priorityAdjuster- the priority adjuster
-
getPriorityAdjuster
- Specified by:
getPriorityAdjusterin interfaceBugReporter- Returns:
- the PriorityAdjuster set for this BugReporter, or null if none was set
-
observeClass
Description copied from interface:IClassObserverObserve a class being visited.- Specified by:
observeClassin interfaceIClassObserver- Parameters:
classDescriptor- class being visited
-
reportBug
Description copied from interface:BugReporterReport a bug. The implementation may report the bug immediately, or queue it for later.- Specified by:
reportBugin interfaceBugReporter- Parameters:
bugInstance- object describing the bug instance
-
logError
Description copied from interface:IErrorLoggerLog an error that occurs while performing analysis.- Specified by:
logErrorin interfaceIErrorLogger- Parameters:
message- the error message
-
reportMissingClass
Description copied from interface:IErrorLoggerCalled to report a class lookup failure.- Specified by:
reportMissingClassin interfaceIErrorLogger- Parameters:
ex- a ClassNotFoundException resulting from the class lookup failure
-
reportMissingClass
Description copied from interface:IErrorLoggerCalled to report a class lookup failure.- Specified by:
reportMissingClassin interfaceIErrorLogger- Parameters:
classDescriptor- ClassDescriptor of a missing class
-
finish
public void finish()Description copied from interface:BugReporterFinish reporting bugs. If any bug reports have been queued, calling this method will flush them.- Specified by:
finishin interfaceBugReporter
-
reportQueuedErrors
public void reportQueuedErrors()Description copied from interface:BugReporterReport any accumulated error messages.- Specified by:
reportQueuedErrorsin interfaceBugReporter
-
addObserver
Description copied from interface:BugReporterAdd an observer.- Specified by:
addObserverin interfaceBugReporter- Parameters:
observer- the observer
-
getProjectStats
Description copied from interface:BugReporterGet ProjectStats object used to store statistics about the overall project being analyzed.- Specified by:
getProjectStatsin interfaceBugReporter
-
logError
Description copied from interface:IErrorLoggerLog an error that occurs while performing analysis.- Specified by:
logErrorin interfaceIErrorLogger- Parameters:
message- the error messagee- the exception which is the underlying cause of the error
-
reportSkippedAnalysis
Report that we skipped some analysis of a method- Specified by:
reportSkippedAnalysisin interfaceIErrorLogger- Parameters:
method-
-
getBugCollection
Description copied from interface:BugReporterGet the bug collection (if any) associated with this bug reporter- Specified by:
getBugCollectionin interfaceBugReporter
-