Package edu.umd.cs.findbugs
Class BugCollectionBugReporter
- java.lang.Object
-
- edu.umd.cs.findbugs.AbstractBugReporter
-
- edu.umd.cs.findbugs.TextUIBugReporter
-
- edu.umd.cs.findbugs.BugCollectionBugReporter
-
- All Implemented Interfaces:
Debug
,RepositoryLookupFailureCallback
,BugReporter
,IClassObserver
,IErrorLogger
- Direct Known Subclasses:
HTMLBugReporter
,SarifBugReporter
,XMLBugReporter
public class BugCollectionBugReporter extends TextUIBugReporter implements Debug
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class edu.umd.cs.findbugs.AbstractBugReporter
AbstractBugReporter.Error
-
-
Field Summary
-
Fields inherited from class edu.umd.cs.findbugs.TextUIBugReporter
outputStream
-
Fields inherited from interface edu.umd.cs.findbugs.BugReporter
NORMAL, SILENT
-
Fields inherited from interface edu.umd.cs.findbugs.ba.Debug
VERIFY_INTEGRITY
-
-
Constructor Summary
Constructors Constructor Description BugCollectionBugReporter(Project project)
BugCollectionBugReporter(Project project, java.io.PrintWriter writer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
doReportBug(BugInstance bugInstance)
Subclasses must override this.protected void
emitLine(java.lang.String line)
Emit one line of the error message report.void
finish()
Finish reporting bugs.BugCollection
getBugCollection()
Get the bug collection (if any) associated with this bug reporterProject
getProject()
BugReporter
getRealBugReporter()
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.void
observeClass(ClassDescriptor classDescriptor)
Observe a class being visited.void
reportMissingClass(java.lang.ClassNotFoundException ex)
Called to report a class lookup failure.-
Methods inherited from class edu.umd.cs.findbugs.TextUIBugReporter
checkBugInstance, getUseLongBugCodes, isApplySuppressions, printBug, reportAnalysisError, reportMissingClass, reportQueuedErrors, setApplySuppressions, setOutputStream, setReportHistory, setReportStackTrace, setShowRank, setUseLongBugCodes, setWriter
-
Methods inherited from class edu.umd.cs.findbugs.AbstractBugReporter
addObserver, getMissingClasses, getMissingClassName, getProjectStats, getQueuedErrors, isRelaxed, isValidMissingClassMessage, notifyObservers, reportBug, reportBugsFromXml, reportMissingClass, reportSkippedAnalysis, setErrorVerbosity, setIsRelaxed, setPriorityThreshold, setRankThreshold
-
-
-
-
Method Detail
-
getProject
public Project getProject()
-
getBugCollection
@Nonnull public BugCollection getBugCollection()
Description copied from interface:BugReporter
Get the bug collection (if any) associated with this bug reporter- Specified by:
getBugCollection
in interfaceBugReporter
-
observeClass
public void observeClass(ClassDescriptor classDescriptor)
Description copied from interface:IClassObserver
Observe a class being visited.- Specified by:
observeClass
in interfaceIClassObserver
- Parameters:
classDescriptor
- class being visited
-
logError
public void logError(java.lang.String message)
Description copied from interface:IErrorLogger
Log an error that occurs while performing analysis.- Specified by:
logError
in interfaceIErrorLogger
- Overrides:
logError
in classAbstractBugReporter
- Parameters:
message
- the error message
-
logError
public void logError(java.lang.String message, java.lang.Throwable e)
Description copied from interface:IErrorLogger
Log an error that occurs while performing analysis.- Specified by:
logError
in interfaceIErrorLogger
- Overrides:
logError
in classAbstractBugReporter
- Parameters:
message
- the error messagee
- the exception which is the underlying cause of the error
-
reportMissingClass
public void reportMissingClass(java.lang.ClassNotFoundException ex)
Description copied from interface:IErrorLogger
Called to report a class lookup failure.- Specified by:
reportMissingClass
in interfaceIErrorLogger
- Overrides:
reportMissingClass
in classAbstractBugReporter
- Parameters:
ex
- a ClassNotFoundException resulting from the class lookup failure
-
doReportBug
public void doReportBug(BugInstance bugInstance)
Description copied from class:AbstractBugReporter
Subclasses must override this. It will be called only for bugs which meet the priority threshold.- Specified by:
doReportBug
in classAbstractBugReporter
- Parameters:
bugInstance
- the bug to report
-
getRealBugReporter
public BugReporter getRealBugReporter()
- Overrides:
getRealBugReporter
in classTextUIBugReporter
-
finish
public void finish()
Description copied from interface:BugReporter
Finish reporting bugs. If any bug reports have been queued, calling this method will flush them.- Specified by:
finish
in interfaceBugReporter
-
emitLine
protected void emitLine(java.lang.String line)
Emit one line of the error message report. By default, error messages are printed to System.err. Subclasses may override.- Overrides:
emitLine
in classTextUIBugReporter
- Parameters:
line
- one line of the error report
-
-