Package edu.umd.cs.findbugs
Class BugPcMap
- java.lang.Object
-
- edu.umd.cs.findbugs.BugPcMap
-
public class BugPcMap extends java.lang.ObjectStores a collection ofBugInstanceand reports them similarly toBugAccumulator.
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.Map<java.lang.Integer,BugInstance>bugInstancesByNextPcprivate java.util.Map<java.lang.Integer,BugInstance>bugInstancesByPcprivate BugReporterreporter
-
Constructor Summary
Constructors Constructor Description BugPcMap(BugReporter reporter)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaccumulateBug(BugInstance sourceLine, BytecodeScanningDetector visitor)voidaddFieldAnnotation(BytecodeScanningDetector visitor)To be called when the visitor has seenConst.PUTSTATICorConst.PUTFIELD.voidreportAccumulatedBugs()Reports accumulated bug instances to theBugReporterand clears itself.
-
-
-
Field Detail
-
reporter
private final BugReporter reporter
-
bugInstancesByPc
private final java.util.Map<java.lang.Integer,BugInstance> bugInstancesByPc
-
bugInstancesByNextPc
private final java.util.Map<java.lang.Integer,BugInstance> bugInstancesByNextPc
-
-
Constructor Detail
-
BugPcMap
public BugPcMap(BugReporter reporter)
-
-
Method Detail
-
accumulateBug
public void accumulateBug(BugInstance sourceLine, BytecodeScanningDetector visitor)
-
addFieldAnnotation
public void addFieldAnnotation(BytecodeScanningDetector visitor)
To be called when the visitor has seenConst.PUTSTATICorConst.PUTFIELD. If a bug instance was created at the previous PC a field annotation will be added.- Parameters:
visitor-
-
reportAccumulatedBugs
public void reportAccumulatedBugs()
Reports accumulated bug instances to theBugReporterand clears itself.
-
-