Class AssertionMethods
java.lang.Object
edu.umd.cs.findbugs.ba.AssertionMethods
Mark methodref constant pool entries of methods that are likely to implement
assertions. This is useful for pruning likely false paths.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final BitSetBitset of methodref constant pool indexes referring to likely assertion methods.private static final booleanprivate static final List<AssertionMethods.UserAssertionMethod> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidinit(org.apache.bcel.classfile.JavaClass jclass) booleanisAssertionCall(org.apache.bcel.generic.InvokeInstruction inv) booleanisAssertionHandle(org.apache.bcel.generic.InstructionHandle handle, org.apache.bcel.generic.ConstantPoolGen cpg) booleanisAssertionInstruction(org.apache.bcel.generic.Instruction ins, org.apache.bcel.generic.ConstantPoolGen cpg) Does the given instruction refer to a likely assertion method?private static booleanisUserAssertionMethod(String className, String methodName)
-
Field Details
-
DEBUG
private static final boolean DEBUG -
assertionMethodRefSet
Bitset of methodref constant pool indexes referring to likely assertion methods. -
userAssertionMethodList
@StaticConstant private static final List<AssertionMethods.UserAssertionMethod> userAssertionMethodList
-
-
Constructor Details
-
AssertionMethods
public AssertionMethods(org.apache.bcel.classfile.JavaClass jclass) Constructor.- Parameters:
jclass- the JavaClass containing the methodrefs
-
-
Method Details
-
init
private void init(org.apache.bcel.classfile.JavaClass jclass) -
isUserAssertionMethod
-
isAssertionHandle
public boolean isAssertionHandle(org.apache.bcel.generic.InstructionHandle handle, org.apache.bcel.generic.ConstantPoolGen cpg) -
isAssertionInstruction
public boolean isAssertionInstruction(org.apache.bcel.generic.Instruction ins, org.apache.bcel.generic.ConstantPoolGen cpg) Does the given instruction refer to a likely assertion method?- Parameters:
ins- the instruction- Returns:
- true if the instruction likely refers to an assertion, false if not
-
isAssertionCall
public boolean isAssertionCall(org.apache.bcel.generic.InvokeInstruction inv)
-