Class IntraproceduralExceptionAnalysis
java.lang.Object
com.ibm.wala.analysis.exceptionanalysis.IntraproceduralExceptionAnalysis
-
Constructor Summary
ConstructorDescriptionIntraproceduralExceptionAnalysis
(CGNode node, ExceptionFilter<SSAInstruction> filter, ClassHierarchy cha, PointerAnalysis<InstanceKey> pointerAnalysis) Create and compute intraprocedural exception analysis.IntraproceduralExceptionAnalysis
(IR ir, ExceptionFilter<SSAInstruction> filter, ClassHierarchy cha) Deprecated.IntraproceduralExceptionAnalysis
(IR ir, ExceptionFilter<SSAInstruction> filter, ClassHierarchy cha, PointerAnalysis<InstanceKey> pointerAnalysis, CGNode node) Create and compute intraprocedural exception analysis. -
Method Summary
Modifier and TypeMethodDescriptioncollectThrownExceptions
(SSAInstruction throwingInstruction) Returns a set of exceptions, which might be thrown from this instruction within this method.getCaughtExceptions
(CallSiteReference callsite) Returns all exceptions for the given call site in the given call graph node, which will be caught.Returns all exceptions which might be created and thrown but not caught or filtered.Return all exceptions that could be returned from getCaughtExceptionsstatic SSAInstruction
boolean
hasUncaughtExceptions
(SSAInstruction instruction) newDummy()
-
Constructor Details
-
IntraproceduralExceptionAnalysis
@Deprecated public IntraproceduralExceptionAnalysis(IR ir, ExceptionFilter<SSAInstruction> filter, ClassHierarchy cha) Deprecated.You can use this method, if you don't have a call graph, but want some exception analysis. But as no pointer analysis is given, we can not consider throw instructions. -
IntraproceduralExceptionAnalysis
public IntraproceduralExceptionAnalysis(CGNode node, ExceptionFilter<SSAInstruction> filter, ClassHierarchy cha, PointerAnalysis<InstanceKey> pointerAnalysis) Create and compute intraprocedural exception analysis. (IR from node.getIR() will be used.) -
IntraproceduralExceptionAnalysis
public IntraproceduralExceptionAnalysis(IR ir, ExceptionFilter<SSAInstruction> filter, ClassHierarchy cha, PointerAnalysis<InstanceKey> pointerAnalysis, CGNode node) Create and compute intraprocedural exception analysis.
-
-
Method Details
-
newDummy
-
getPossiblyCaughtExceptions
Return all exceptions that could be returned from getCaughtExceptions- Returns:
- all exceptions that could be returned from getCaughtExceptions
-
collectThrownExceptions
Returns a set of exceptions, which might be thrown from this instruction within this method.This does include exceptions dispatched by throw instructions, but not exceptions from method calls.
- Returns:
- a set of exceptions, which might be thrown from this instruction within this method
-
getThrowingInstruction
- Returns:
- an instruction which may throw exceptions, or null if this block can't throw exceptions
-
getCaughtExceptions
Returns all exceptions for the given call site in the given call graph node, which will be caught.- Returns:
- caught exceptions
-
hasUncaughtExceptions
-
getExceptions
Returns all exceptions which might be created and thrown but not caught or filtered. (So this does not contain exceptions from invoked methods.)If constructed without points-to-analysis, it does not contain exceptions thrown by throw statements.
- Returns:
- all exceptions created and thrown intraprocedural
-