Package edu.umd.cs.findbugs
Class SynchronizedBugReporter
- java.lang.Object
-
- edu.umd.cs.findbugs.SynchronizedBugReporter
-
- All Implemented Interfaces:
RepositoryLookupFailureCallback,BugReporter,IClassObserver,IErrorLogger
class SynchronizedBugReporter extends java.lang.Object implements BugReporter
An implementation ofBugReporterthat synchronize all method invocations.- Since:
- 4.0
-
-
Field Summary
Fields Modifier and Type Field Description private BugReporterdelegate-
Fields inherited from interface edu.umd.cs.findbugs.BugReporter
NORMAL, SILENT
-
-
Constructor Summary
Constructors Constructor Description SynchronizedBugReporter(BugReporter delegate)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddObserver(BugReporterObserver observer)Add an observer.voidfinish()Finish reporting bugs.BugCollectiongetBugCollection()Get the bug collection (if any) associated with this bug reporterProjectStatsgetProjectStats()Get ProjectStats object used to store statistics about the overall project being analyzed.voidlogError(java.lang.String message)Log an error that occurs while performing analysis.voidlogError(java.lang.String message, java.lang.Throwable e)Log 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.voidreportMissingClass(java.lang.ClassNotFoundException ex)Called to report a class lookup failure.voidreportQueuedErrors()Report any accumulated error messages.voidreportSkippedAnalysis(MethodDescriptor method)Report that we skipped some analysis of a methodvoidsetErrorVerbosity(int level)Set the error-reporting verbosity level.voidsetPriorityThreshold(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.classfile.IErrorLogger
reportMissingClass
-
-
-
-
Field Detail
-
delegate
@NonNull private final BugReporter delegate
-
-
Constructor Detail
-
SynchronizedBugReporter
SynchronizedBugReporter(@NonNull BugReporter delegate)
-
-
Method Detail
-
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
-
observeClass
public void observeClass(ClassDescriptor classDescriptor)
Description copied from interface:IClassObserverObserve a class being visited.- Specified by:
observeClassin interfaceIClassObserver- Parameters:
classDescriptor- class being visited
-
reportBug
public void reportBug(@Nonnull BugInstance bugInstance)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
public void logError(java.lang.String message)
Description copied from interface:IErrorLoggerLog an error that occurs while performing analysis.- Specified by:
logErrorin interfaceIErrorLogger- Parameters:
message- the error message
-
reportMissingClass
public void reportMissingClass(java.lang.ClassNotFoundException ex)
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
public void reportMissingClass(ClassDescriptor classDescriptor)
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
public void addObserver(BugReporterObserver observer)
Description copied from interface:BugReporterAdd an observer.- Specified by:
addObserverin interfaceBugReporter- Parameters:
observer- the observer
-
getProjectStats
public ProjectStats getProjectStats()
Description copied from interface:BugReporterGet ProjectStats object used to store statistics about the overall project being analyzed.- Specified by:
getProjectStatsin interfaceBugReporter
-
logError
public void logError(java.lang.String message, java.lang.Throwable e)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
public void reportSkippedAnalysis(MethodDescriptor method)
Report that we skipped some analysis of a method- Specified by:
reportSkippedAnalysisin interfaceIErrorLogger- Parameters:
method-
-
getBugCollection
@CheckForNull public BugCollection getBugCollection()
Description copied from interface:BugReporterGet the bug collection (if any) associated with this bug reporter- Specified by:
getBugCollectionin interfaceBugReporter
-
-