FindBugs™ 1.3.4

edu.umd.cs.findbugs
Class BugAccumulator

java.lang.Object
  extended by edu.umd.cs.findbugs.BugAccumulator

public class BugAccumulator
extends java.lang.Object

Accumulate warnings that may occur at multiple source locations, consolidating them into a single warning.

Author:
Bill Pugh, David Hovemeyer

Constructor Summary
BugAccumulator(BugReporter reporter)
          Constructor.
 
Method Summary
 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.
 java.lang.Iterable<? extends SourceLineAnnotation> locations(BugInstance bug)
           
 void reportAccumulatedBugs()
          Report accumulated warnings to the BugReporter.
 java.lang.Iterable<? extends BugInstance> uniqueBugs()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BugAccumulator

public BugAccumulator(BugReporter reporter)
Constructor.

Parameters:
reporter - the BugReporter to which warnings should eventually be reported
Method Detail

accumulateBug

public void accumulateBug(BugInstance bug,
                          SourceLineAnnotation sourceLine)
Accumulate a warning at given source location.

Parameters:
bug - the warning
sourceLine - the source location

accumulateBug

public void accumulateBug(BugInstance bug,
                          BytecodeScanningDetector visitor)
Accumulate a warning at source location currently being visited by given BytecodeScanningDetector.

Parameters:
bug - the warning
visitor - the BytecodeScanningDetector

uniqueBugs

public java.lang.Iterable<? extends BugInstance> uniqueBugs()

locations

public java.lang.Iterable<? extends SourceLineAnnotation> locations(BugInstance bug)

reportAccumulatedBugs

public void reportAccumulatedBugs()
Report accumulated warnings to the BugReporter. Clears all accumulated warnings as a side-effect.


FindBugs™ 1.3.4

FindBugs™ is licenced under the LGPL. Copyright © 2006 University of Maryland.