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
Nested ClassesModifier and TypeClassDescriptionstatic classType representing a dynamically created String.static classstatic classstatic classType representing a String passed as a parameter.static classType 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_TOPFields 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 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) voidreport()This method is called after all classes to be visited.voidvisitClassContext(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:DetectorVisit the ClassContext for a class which should be analyzed for instances of bug patterns.- Specified by:
visitClassContextin 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:DetectorThis 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.
-