Package edu.umd.cs.findbugs.detect
Class UselessSubclassMethod
- All Implemented Interfaces:
Detector
,Priorities
,StatelessDetector
,Cloneable
,org.apache.bcel.classfile.Visitor
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate org.apache.bcel.generic.Type[]
private final BugReporter
private int
private int
private int
private UselessSubclassMethod.State
private String
Fields inherited from class edu.umd.cs.findbugs.visitclass.DismantleBytecode
codeBytes, lineNumberTable, M_BR, M_CP, M_INT, M_PAD, M_R, M_UINT
Fields 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 void
checkParm
(int seen, int fastOpBase, int slowOp, int parmSize) private boolean
differentAttributes
(org.apache.bcel.classfile.Method m1, org.apache.bcel.classfile.Method m2) private org.apache.bcel.classfile.Method
findSuperclassMethod
(String superclassName, org.apache.bcel.classfile.Method subclassMethod) getPackage
(String classname) boolean
samePackage
(String classname1, String classname2) void
sawOpcode
(int seen) thrownExceptions
(org.apache.bcel.classfile.Method m) void
visitAfter
(org.apache.bcel.classfile.JavaClass obj) void
visitClassContext
(ClassContext classContext) Visit the ClassContext for a class which should be analyzed for instances of bug patterns.void
visitCode
(org.apache.bcel.classfile.Code obj) void
visitMethod
(org.apache.bcel.classfile.Method obj) Methods inherited from class edu.umd.cs.findbugs.BytecodeScanningDetector
getClassContext, report, shouldVisitCode
Methods inherited from class edu.umd.cs.findbugs.visitclass.DismantleBytecode
afterOpcode, areOppositeBranches, atCatchBlock, beforeOpcode, getBranchFallThrough, getBranchOffset, getBranchTarget, getClassConstantOperand, getClassDescriptorOperand, getCodeByte, getConstantRefOperand, getDefaultSwitchOffset, getDottedClassConstantOperand, getFieldDescriptorOperand, getIntConstant, getLongConstant, getMaxPC, getMethodDescriptorOperand, getNameConstantOperand, getNextCodeByte, getNextOpcode, getNextPC, getOpcode, getPC, getPrevOpcode, getRefConstantOperand, getRefFieldIsStatic, getRegisterOperand, getSigConstantOperand, getStringConstantOperand, getSwitchLabels, getSwitchOffsets, getXClassOperand, getXFieldOperand, getXMethodOperand, isBranch, isMethodCall, isRegisterLoad, isRegisterStore, isRegisterStore, isReturn, isShift, isSwitch, isWideOpcode, printOpCode, sawBranchTo, sawClass, sawDouble, sawField, sawFloat, sawIMethod, sawInt, sawLong, sawMethod, sawRegister, sawString, visit
Methods inherited from class edu.umd.cs.findbugs.visitclass.AnnotationVisitor
getAnnotationParameterAsEnum, getAnnotationParameterAsString, getAnnotationParameterAsStringArray, visitAnnotation, visitAnnotation, visitParameterAnnotation, visitParameterAnnotation, visitSyntheticParameterAnnotation
Methods inherited from class edu.umd.cs.findbugs.visitclass.PreorderVisitor
amVisitingMainMethod, asUnsignedByte, doVisitMethod, getClassDescriptor, getClassName, getCode, getConstantPool, getDottedClassName, getDottedFieldSig, getDottedMethodSig, getDottedSuperclassName, getField, getFieldDescriptor, getFieldIsStatic, getFieldName, getFieldSig, getFullyQualifiedFieldName, getFullyQualifiedMethodName, getMethod, getMethodDescriptor, getMethodName, getMethodSig, getMethodVisitOrder, getNumberArguments, getNumberMethodArguments, getPackageName, getSizeOfSurroundingTryBlock, getSizeOfSurroundingTryBlock, getSourceFile, getStringFromIndex, getSuperclassName, getSurroundingCaughtExceptions, getSurroundingCaughtExceptions, getSurroundingCaughtExceptionTypes, getSurroundingTryBlock, getSurroundingTryBlock, getThisClass, getXClass, getXField, getXMethod, hasInterestingClass, hasInterestingMethod, isVisitMethodsInCallOrder, setupVisitorForClass, setVisitMethodsInCallOrder, shouldVisit, toString, visitAfter, visitAnnotationDefault, visitAnnotationEntry, visitBootstrapMethods, visitConstantInvokeDynamic, visitConstantMethodHandle, visitConstantMethodType, visitConstantModule, visitConstantPackage, visitConstantPool, visitEnclosingMethod, visitingField, visitingMethod, visitInnerClasses, visitJavaClass, visitLineNumberTable, visitLocalVariableTable, visitMethodParameters, visitParameterAnnotationEntry, visitStackMap, visitStackMapEntry
Methods inherited from class edu.umd.cs.findbugs.visitclass.BetterVisitor
clone, report, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visitCodeException, visitConstantClass, visitConstantDouble, visitConstantFieldref, visitConstantFloat, visitConstantInteger, visitConstantInterfaceMethodref, visitConstantLong, visitConstantMethodref, visitConstantNameAndType, visitConstantString, visitConstantUtf8, visitConstantValue, visitDeprecated, visitExceptionTable, visitField, visitInnerClass, visitLineNumber, visitLocalVariable, visitLocalVariableTypeTable, visitSignature, visitSourceFile, visitSynthetic, visitUnknown
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface edu.umd.cs.findbugs.StatelessDetector
clone
Methods inherited from interface org.apache.bcel.classfile.Visitor
visitConstantDynamic, visitMethodParameter, visitModule, visitModuleExports, visitModuleMainClass, visitModuleOpens, visitModulePackages, visitModuleProvides, visitModuleRequires, visitNestHost, visitNestMembers, visitRecord, visitRecordComponent, visitStackMapType
-
Field Details
-
bugReporter
-
superclassName
-
state
-
curParm
private int curParm -
curParmOffset
private int curParmOffset -
invokePC
private int invokePC -
argTypes
private org.apache.bcel.generic.Type[] argTypes -
interfaceMethods
-
-
Constructor Details
-
UselessSubclassMethod
-
-
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
- Overrides:
visitClassContext
in classBytecodeScanningDetector
- Parameters:
classContext
- the ClassContext
-
visitAfter
public void visitAfter(org.apache.bcel.classfile.JavaClass obj) - Overrides:
visitAfter
in classPreorderVisitor
-
visitMethod
public void visitMethod(org.apache.bcel.classfile.Method obj) - Specified by:
visitMethod
in interfaceorg.apache.bcel.classfile.Visitor
- Overrides:
visitMethod
in classBetterVisitor
-
visitCode
public void visitCode(org.apache.bcel.classfile.Code obj) - Specified by:
visitCode
in interfaceorg.apache.bcel.classfile.Visitor
- Overrides:
visitCode
in classPreorderVisitor
-
getPackage
-
samePackage
-
sawOpcode
public void sawOpcode(int seen) - Overrides:
sawOpcode
in classDismantleBytecode
-
checkParm
private void checkParm(int seen, int fastOpBase, int slowOp, int parmSize) -
findSuperclassMethod
private org.apache.bcel.classfile.Method findSuperclassMethod(@DottedClassName String superclassName, org.apache.bcel.classfile.Method subclassMethod) throws ClassNotFoundException - Throws:
ClassNotFoundException
-
thrownExceptions
-
differentAttributes
private boolean differentAttributes(org.apache.bcel.classfile.Method m1, org.apache.bcel.classfile.Method m2)
-