Class PruneInfeasibleExceptionEdges
java.lang.Object
edu.umd.cs.findbugs.ba.PruneInfeasibleExceptionEdges
- All Implemented Interfaces:
EdgeTypes
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static classA memento to remind us of how we classified a particular exception edge. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final CFGprivate booleanprivate static final booleanprivate static intprivate static final booleanprivate final TypeDataflowFields inherited from interface EdgeTypes
BACKEDGE_SOURCE_EDGE, BACKEDGE_TARGET_EDGE, CHECKED_EXCEPTIONS_FLAG, EXIT_EDGE, EXPLICIT_EXCEPTIONS_FLAG, FALL_THROUGH_EDGE, GOTO_EDGE, HANDLED_EXCEPTION_EDGE, IFCMP_EDGE, JSR_EDGE, RET_EDGE, RETURN_EDGE, START_EDGE, SWITCH_DEFAULT_EDGE, SWITCH_EDGE, UNHANDLED_EXCEPTION_EDGE, UNKNOWN_EDGE -
Constructor Summary
ConstructorsConstructorDescriptionPruneInfeasibleExceptionEdges(CFG cfg, org.apache.bcel.generic.MethodGen methodGen, TypeDataflow typeDataflow) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoidexecute()Prune infeasible exception edges from the CFG.boolean
-
Field Details
-
DEBUG
private static final boolean DEBUG -
STATS
private static final boolean STATS -
numEdgesPruned
private static int numEdgesPruned -
cfg
-
typeDataflow
-
cfgModified
private boolean cfgModified
-
-
Constructor Details
-
PruneInfeasibleExceptionEdges
public PruneInfeasibleExceptionEdges(CFG cfg, org.apache.bcel.generic.MethodGen methodGen, TypeDataflow typeDataflow) Constructor.- Parameters:
cfg- the CFG to prunemethodGen- the methodtypeDataflow- initialized TypeDataflow object for the CFG, indicating the types of all stack locations
-
-
Method Details
-
execute
Prune infeasible exception edges from the CFG. If the method returns normally, then the operation was successful, and the CFG should no longer contain infeasible exception edges. If ClassNotFoundException or DataflowAnalysisException are thrown, then the operation was unsuccessful, but the CFG is still valid because it was not modified. If a runtime exception is thrown, then the CFG may be partially modified and should be considered invalid.- Throws:
ClassNotFoundException
-
wasCFGModified
public boolean wasCFGModified()- Returns:
- true if modified
-