Package edu.umd.cs.findbugs
Class BugAccumulator
java.lang.Object
edu.umd.cs.findbugs.BugAccumulator
Accumulate warnings that may occur at multiple source locations,
consolidating them into a single warning.
- Author:
- Bill Pugh, David Hovemeyer
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
accumulateBug
(BugInstance bug, ClassContext classContext, org.apache.bcel.classfile.Method method, Location location) void
accumulateBug
(BugInstance bug, ClassContext classContext, org.apache.bcel.generic.MethodGen methodGen, String sourceFile, Location location) void
accumulateBug
(BugInstance bug, BytecodeScanningDetector visitor) Accumulate a warning at source location currently being visited by given BytecodeScanningDetector.void
accumulateBug
(BugInstance bug, SourceLineAnnotation sourceLine) Accumulate a warning at given source location.void
Clear all accumulated bugs without reporting themvoid
Iterable
<? extends SourceLineAnnotation> locations
(BugInstance bug) void
Report accumulated warnings to the BugReporter.void
reportBug
(BugInstance bug, edu.umd.cs.findbugs.BugAccumulator.Data d) Iterable
<? extends BugInstance>
-
Constructor Details
-
BugAccumulator
Constructor.- Parameters:
reporter
- the BugReporter to which warnings should eventually be reported
-
-
Method Details
-
getLastBugLocation
-
forgetLastBug
public void forgetLastBug() -
accumulateBug
Accumulate a warning at given source location.- Parameters:
bug
- the warningsourceLine
- the source location
-
accumulateBug
Accumulate a warning at source location currently being visited by given BytecodeScanningDetector.- Parameters:
bug
- the warningvisitor
- the BytecodeScanningDetector
-
uniqueBugs
-
locations
-
reportAccumulatedBugs
public void reportAccumulatedBugs()Report accumulated warnings to the BugReporter. Clears all accumulated warnings as a side-effect. -
reportBug
-
clearBugs
public void clearBugs()Clear all accumulated bugs without reporting them -
accumulateBug
public void accumulateBug(BugInstance bug, ClassContext classContext, org.apache.bcel.classfile.Method method, Location location) -
accumulateBug
public void accumulateBug(BugInstance bug, ClassContext classContext, org.apache.bcel.generic.MethodGen methodGen, String sourceFile, Location location)
-