Class FindHiddenMethod
java.lang.Object
edu.umd.cs.findbugs.detect.FindHiddenMethod
- All Implemented Interfaces:
Detector, Priorities
This detector finds all the methods of a subclass which are hiding the static methods of the superclass.
Please see @see SEI CERT MET07-J
-
Field Summary
FieldsFields inherited from interface Priorities
EXP_PRIORITY, HIGH_PRIORITY, IGNORE_PRIORITY, LOW_PRIORITY, NORMAL_PRIORITY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate booleanisAutoGeneratedMethod(org.apache.bcel.classfile.Method method) This method checks for the autoGenerated methods for an inner class - exceptional cases.private booleanisConstructor(org.apache.bcel.classfile.Method method) This method is here to check the exceptional case of Constructorsprivate booleanisHidingInnerClass(org.apache.bcel.classfile.Method method) This method checks for the inner class exceptional cases.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.
-
Field Details
-
bugReporter
-
-
Constructor Details
-
FindHiddenMethod
-
-
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
-
report
-
isHidingInnerClass
private boolean isHidingInnerClass(org.apache.bcel.classfile.Method method) This method checks for the inner class exceptional cases. As whenever there an inner class, '.access$' methods are created hiddenly to access the outer class attributes. -
isAutoGeneratedMethod
private boolean isAutoGeneratedMethod(org.apache.bcel.classfile.Method method) This method checks for the autoGenerated methods for an inner class - exceptional cases. As whenever there an inner class, '.class$' methods are created hiddenly. -
isConstructor
private boolean isConstructor(org.apache.bcel.classfile.Method method) This method is here to check the exceptional case of Constructors
-