Package edu.umd.cs.findbugs.detect
Class FindHiddenMethod
- java.lang.Object
-
- edu.umd.cs.findbugs.detect.FindHiddenMethod
-
- All Implemented Interfaces:
Detector,Priorities
public class FindHiddenMethod extends java.lang.Object implements Detector
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
Fields Modifier and Type Field Description private BugReporterbugReporter-
Fields inherited from interface edu.umd.cs.findbugs.Priorities
EXP_PRIORITY, HIGH_PRIORITY, IGNORE_PRIORITY, LOW_PRIORITY, NORMAL_PRIORITY
-
-
Constructor Summary
Constructors Constructor Description FindHiddenMethod(BugReporter bugReporter)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private 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 Detail
-
bugReporter
private final BugReporter bugReporter
-
-
Constructor Detail
-
FindHiddenMethod
public FindHiddenMethod(BugReporter bugReporter)
-
-
Method Detail
-
visitClassContext
public void visitClassContext(ClassContext classContext)
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
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.
-
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
-
-