Package edu.umd.cs.findbugs.detect
Class RedundantConditions
java.lang.Object
edu.umd.cs.findbugs.detect.RedundantConditions
- All Implemented Interfaces:
Detector
,Priorities
-
Field Summary
FieldsFields inherited from interface edu.umd.cs.findbugs.Priorities
EXP_PRIORITY, HIGH_PRIORITY, IGNORE_PRIORITY, LOW_PRIORITY, NORMAL_PRIORITY
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate org.apache.bcel.generic.InstructionHandle
getConsumer
(org.apache.bcel.generic.MethodGen methodGen, org.apache.bcel.generic.InstructionHandle start) private int
getIntValue
(org.apache.bcel.generic.InstructionHandle handle) private int
getPriority
(MethodDescriptor methodDescriptor, ValueRangeAnalysisFactory.RedundantCondition condition) private String
void
report()
This method is called after all classes to be visited.void
visitClassContext
(ClassContext classContext) Visit the ClassContext for a class which should be analyzed for instances of bug patterns.
-
Field Details
-
bugAccumulator
-
bugReporter
-
-
Constructor Details
-
RedundantConditions
-
-
Method Details
-
visitClassContext
Description copied from interface:Detector
Visit the ClassContext for a class which should be analyzed for instances of bug patterns.- Specified by:
visitClassContext
in interfaceDetector
- Parameters:
classContext
- the ClassContext
-
normalize
-
getPriority
private int getPriority(MethodDescriptor methodDescriptor, ValueRangeAnalysisFactory.RedundantCondition condition) -
getConsumer
private org.apache.bcel.generic.InstructionHandle getConsumer(org.apache.bcel.generic.MethodGen methodGen, org.apache.bcel.generic.InstructionHandle start) - Parameters:
methodGen
- methodstart
- instruction to scan- Returns:
- instruction which consumes value which was on top of stack before start instruction or null if cannot be determined
-
getIntValue
private int getIntValue(org.apache.bcel.generic.InstructionHandle handle) -
report
public void report()Description copied from interface:Detector
This method is called after all classes to be visited. It should be used by any detectors which accumulate information over all visited classes to generate results.
-