Package edu.umd.cs.findbugs
Class PriorityAdjuster
- java.lang.Object
-
- edu.umd.cs.findbugs.PriorityAdjuster
-
public class PriorityAdjuster extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description (package private) java.util.Map<java.lang.String,PriorityAdjustment>adjustmentsprivate DetectorFactoryChooserfactoryChooser
-
Constructor Summary
Constructors Constructor Description PriorityAdjuster(java.util.Map<java.lang.String,java.lang.String> adjustments)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intadjustForDetector(BugInstance bugInstance)Adjust priority if the factory was forcibly enabled byExecutionPlanalthough the user did not select it.(package private) BugInstanceadjustPriority(BugInstance bugInstance)Returns an instance with adjusted priority.private static java.lang.StringcheckTarget(java.lang.String adjustmentTarget)voidsetFactoryChooser(DetectorFactoryChooser factoryChooser)Set the factory chooser used byExecutionPlan
-
-
-
Field Detail
-
adjustments
java.util.Map<java.lang.String,PriorityAdjustment> adjustments
-
factoryChooser
private DetectorFactoryChooser factoryChooser
-
-
Method Detail
-
checkTarget
private static java.lang.String checkTarget(java.lang.String adjustmentTarget)
-
adjustPriority
BugInstance adjustPriority(BugInstance bugInstance)
Returns an instance with adjusted priority. If no adjustment is necessary, the original instance is returned. Otherwise, a cloned instance is returned with an adjusted priority value.- Parameters:
bugInstance- the bug instance to adjust- Returns:
- the cloned and changed bug instance, or the original one in case that no change is necessary
-
adjustForDetector
public int adjustForDetector(BugInstance bugInstance)
Adjust priority if the factory was forcibly enabled byExecutionPlanalthough the user did not select it.- Parameters:
bugInstance-- Returns:
- adjusted bug priority
-
setFactoryChooser
public void setFactoryChooser(@NonNull DetectorFactoryChooser factoryChooser)
Set the factory chooser used byExecutionPlan- Parameters:
factoryChooser- the factory chooser, never null
-
-