Package edu.umd.cs.findbugs.detect
Class FindRefComparison
java.lang.Object
edu.umd.cs.findbugs.detect.FindRefComparison
- All Implemented Interfaces:
ExtendedTypes
,Detector
,Priorities
Find suspicious reference comparisons. This includes:
- Strings and other java.lang objects compared by reference equality
- Calls to equals(Object) where the argument is a different type than the receiver object
- Author:
- David Hovemeyer, Bill Pugh
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Type representing a dynamically created String.static class
static class
static class
Type representing a String passed as a parameter.static class
Type representing a static String. -
Field Summary
Fields inherited from interface edu.umd.cs.findbugs.ba.type.ExtendedTypes
T_AVAIL_TYPE, T_BOTTOM, T_DOUBLE_EXTRA, T_EXCEPTION, T_LONG_EXTRA, T_NULL, T_TOP
Fields inherited from interface edu.umd.cs.findbugs.Priorities
EXP_PRIORITY, HIGH_PRIORITY, IGNORE_PRIORITY, LOW_PRIORITY, NORMAL_PRIORITY
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetInvokedMethod
(org.apache.bcel.generic.ConstantPoolGen cpg, org.apache.bcel.generic.InvokeInstruction inv) getMethodCalledAnnotation
(org.apache.bcel.generic.ConstantPoolGen cpg, org.apache.bcel.generic.InvokeInstruction inv) 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.
-
Constructor Details
-
FindRefComparison
-
-
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
-
getMethodCalledAnnotation
@CheckForNull public MethodAnnotation getMethodCalledAnnotation(org.apache.bcel.generic.ConstantPoolGen cpg, org.apache.bcel.generic.InvokeInstruction inv) -
getInvokedMethod
public MethodDescriptor getInvokedMethod(org.apache.bcel.generic.ConstantPoolGen cpg, org.apache.bcel.generic.InvokeInstruction inv) -
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.
-