edu.umd.cs.findbugs.plan
Class AnalysisPass

java.lang.Object
  extended by edu.umd.cs.findbugs.plan.AnalysisPass

public class AnalysisPass
extends java.lang.Object

An analysis pass in the overall ExecutionPlan. This is a list of Detectors to be applied to analyzed classes.

Author:
David Hovemeyer
See Also:
ExecutionPlan

Constructor Summary
AnalysisPass()
          Constructor.
 
Method Summary
 void addToPass(DetectorFactory factory)
          Make given DetectorFactory a member of this pass.
 void append(DetectorFactory factory)
          Append the given DetectorFactory to the end of the ordered detector list.
 boolean contains(DetectorFactory factory)
          Return whether or not this pass contains the given DetectorFactory.
 void createDetectors(BugReporter bugReporter)
          Create all of the Detectors in this analysis pass.
 Detector[] getDetectorList()
          Get list of all Detectors.
 java.util.Collection<DetectorFactory> getMembers()
          Get the members of this pass.
 java.util.Set<DetectorFactory> getUnpositionedMembers()
          Get Set of pass members which haven't been assigned a position in the pass.
 java.util.Iterator<DetectorFactory> iterator()
          Get an Iterator over the DetectorFactory objects in the pass, in their assigned order.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AnalysisPass

public AnalysisPass()
Constructor. Creates an empty analysis pass.

Method Detail

addToPass

public void addToPass(DetectorFactory factory)
Make given DetectorFactory a member of this pass. Does not position the factory within the overall list of detectors.

Parameters:
factory - a DetectorFactory

append

public void append(DetectorFactory factory)
Append the given DetectorFactory to the end of the ordered detector list. The factory must be a member of the pass.

Parameters:
factory - a DetectorFactory

getMembers

public java.util.Collection<DetectorFactory> getMembers()
Get the members of this pass.

Returns:
members of this pass

getUnpositionedMembers

public java.util.Set<DetectorFactory> getUnpositionedMembers()
Get Set of pass members which haven't been assigned a position in the pass.


iterator

public java.util.Iterator<DetectorFactory> iterator()
Get an Iterator over the DetectorFactory objects in the pass, in their assigned order.


contains

public boolean contains(DetectorFactory factory)
Return whether or not this pass contains the given DetectorFactory.

Parameters:
factory - the DetectorFactory
Returns:
true if this pass contains the DetectorFactory, false if not

createDetectors

public void createDetectors(BugReporter bugReporter)
Create all of the Detectors in this analysis pass.

Parameters:
bugReporter - BugReporter to pass to the constructor of each created Detector

getDetectorList

public Detector[] getDetectorList()
Get list of all Detectors. This should only be called after createDetectors() has been called.