Package edu.umd.cs.findbugs.ba
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.
- Author:
- David Hovemeyer
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
isAssertionCall
(org.apache.bcel.generic.InvokeInstruction inv) boolean
isAssertionHandle
(org.apache.bcel.generic.InstructionHandle handle, org.apache.bcel.generic.ConstantPoolGen cpg) boolean
isAssertionInstruction
(org.apache.bcel.generic.Instruction ins, org.apache.bcel.generic.ConstantPoolGen cpg) Does the given instruction refer to a likely assertion method?
-
Constructor Details
-
AssertionMethods
public AssertionMethods(org.apache.bcel.classfile.JavaClass jclass) Constructor.- Parameters:
jclass
- the JavaClass containing the methodrefs
-
-
Method Details
-
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)
-