Package edu.umd.cs.findbugs.plan
Class AnalysisPass
- java.lang.Object
-
- edu.umd.cs.findbugs.plan.AnalysisPass
-
public class AnalysisPass extends java.lang.ObjectAn analysis pass in the overall ExecutionPlan. This is a list of Detectors to be applied to analyzed classes.- See Also:
ExecutionPlan
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.HashSet<DetectorFactory>memberSetprivate java.util.LinkedList<DetectorFactory>orderedFactoryList
-
Constructor Summary
Constructors Constructor Description AnalysisPass()Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddToPass(DetectorFactory factory)Make given DetectorFactory a member of this pass.voidappend(DetectorFactory factory)Append the given DetectorFactory to the end of the ordered detector list.booleancontains(DetectorFactory factory)Return whether or not this pass contains the given DetectorFactory.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.Detector2[]instantiateDetector2sInPass(BugReporter bugReporter)Instantiate all of the Detector2s in this pass and return them in a (correctly-ordered) array.java.util.Iterator<DetectorFactory>iterator()Get an Iterator over the DetectorFactory objects in the pass, in their assigned order.
-
-
-
Field Detail
-
orderedFactoryList
private final java.util.LinkedList<DetectorFactory> orderedFactoryList
-
memberSet
private final java.util.HashSet<DetectorFactory> memberSet
-
-
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
-
instantiateDetector2sInPass
public Detector2[] instantiateDetector2sInPass(BugReporter bugReporter)
Instantiate all of the Detector2s in this pass and return them in a (correctly-ordered) array.- Parameters:
bugReporter- the BugReporter- Returns:
- array of Detector2s
-
-