Interface BugReporter
- All Superinterfaces:
IClassObserver, IErrorLogger, RepositoryLookupFailureCallback
- All Known Subinterfaces:
ConfigurableBugReporter
- All Known Implementing Classes:
AbstractBugReporter, BugCollectionBugReporter, BugReportDispatcher, BugReporterDecorator, CategoryFilteringBugReporter, DelegatingBugReporter, EmacsBugReporter, ErrorCountingBugReporter, ExcludingHashesBugReporter, FilterBugReporter, HTMLBugReporter, MaxRankDecorator, PrintingBugReporter, SarifBugReporter, SortingBugReporter, SuppressionDecorator, SuppressionMatcherBugReporter, SynchronizedBugReporter, TextUIBugReporter, XDocsBugReporter, XMLBugReporter
Generic interface for bug reporter objects. A BugReporter accumulates all of
the information reported by the analysis, which includes bug reports, and
also auxiliary information such as analysis errors, missing classes, and
class to source file mapping.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoidaddObserver(BugReporterObserver observer) Add an observer.voidfinish()Finish reporting bugs.@Nullable BugCollectionGet the bug collection (if any) associated with this bug reporterdefault @Nullable PriorityAdjusterGet ProjectStats object used to store statistics about the overall project being analyzed.voidreportBug(@NonNull BugInstance bugInstance) Report a bug.voidReport any accumulated error messages.voidsetErrorVerbosity(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 interface IClassObserver
observeClassMethods inherited from interface IErrorLogger
logError, logError, reportMissingClass, reportMissingClass, reportMissingClass, reportSkippedAnalysis
-
Field Details
-
SILENT
static final int SILENTSilent error-reporting verbosity level.- See Also:
-
NORMAL
static final int NORMALNormal error-reporting verbosity level.- See Also:
-
-
Method Details
-
setErrorVerbosity
void setErrorVerbosity(int level) Set the error-reporting verbosity level.- Parameters:
level- the verbosity level
-
setPriorityThreshold
void setPriorityThreshold(int threshold) Set the priority threshold.- Parameters:
threshold- bug instances must be at least as important as this priority to be reported
-
setPriorityAdjuster
Set an optional priority adjuster.- Parameters:
priorityAdjuster- the priority adjuster
-
reportBug
Report a bug. The implementation may report the bug immediately, or queue it for later.- Parameters:
bugInstance- object describing the bug instance
-
finish
void finish()Finish reporting bugs. If any bug reports have been queued, calling this method will flush them. -
reportQueuedErrors
void reportQueuedErrors()Report any accumulated error messages. -
addObserver
-
getProjectStats
ProjectStats getProjectStats()Get ProjectStats object used to store statistics about the overall project being analyzed. -
getBugCollection
@Nullable BugCollection getBugCollection()Get the bug collection (if any) associated with this bug reporter -
getPriorityAdjuster
- Returns:
- the PriorityAdjuster set for this BugReporter, or null if none was set
-