|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsoot.toolkits.exceptions.AbstractThrowAnalysis
soot.toolkits.exceptions.UnitThrowAnalysis
public class UnitThrowAnalysis
A ThrowAnalysis
which returns the set of runtime exceptions
and errors that might be thrown by the bytecode instructions
represented by a unit, as indicated by the Java Virtual Machine
specification. I.e. this analysis is based entirely on the
“opcode” of the unit, the types of its arguments, and
the values of constant arguments.
The mightThrow
methods could be declared static.
They are left virtual to facilitate testing. For example,
to verify that the expressions in a method call are actually being
examined, a test case can override the mightThrow(SootMethod)
with an implementation which returns the empty set instead of
all possible exceptions.
Nested Class Summary | |
---|---|
protected class |
UnitThrowAnalysis.UnitSwitch
|
protected class |
UnitThrowAnalysis.ValueSwitch
|
Constructor Summary | |
---|---|
protected |
UnitThrowAnalysis()
A protected constructor for use by unit tests. |
|
UnitThrowAnalysis(Singletons.Global g)
Constructs a UnitThrowAnalysis for inclusion in
Soot's global variable manager, G . |
Method Summary | |
---|---|
ThrowableSet |
mightThrow(Unit u)
Returns a set representing the Throwable types that
the specified unit might throw. |
ThrowableSet |
mightThrowImplicitly(ThrowInst t)
Returns a set representing the Throwable types that
the specified throw instruction might throw implicitly, that is,
the possible types of errors which might arise in the course
of executing the throw instruction, rather than
the type of the throw 's operand. |
ThrowableSet |
mightThrowImplicitly(ThrowStmt t)
Returns a set representing the Throwable types that
the specified throw statement might throw implicitly, that is,
the possible types of errors which might arise in the course
of executing the throw statement, rather than
the type of the throw 's operand. |
static UnitThrowAnalysis |
v()
Returns the single instance of UnitThrowAnalysis . |
Methods inherited from class soot.toolkits.exceptions.AbstractThrowAnalysis |
---|
mightThrowExplicitly, mightThrowExplicitly |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public UnitThrowAnalysis(Singletons.Global g)
UnitThrowAnalysis
for inclusion in
Soot's global variable manager, G
.
g
- guarantees that the constructor may only be called
from Singletons
.protected UnitThrowAnalysis()
Method Detail |
---|
public static UnitThrowAnalysis v()
UnitThrowAnalysis
.
UnitThrowAnalysis
.public ThrowableSet mightThrow(Unit u)
ThrowAnalysis
Throwable
types that
the specified unit might throw.
mightThrow
in interface ThrowAnalysis
mightThrow
in class AbstractThrowAnalysis
u
- Unit
whose exceptions are to be returned.
Throwable
types that
u
might throw.public ThrowableSet mightThrowImplicitly(ThrowInst t)
ThrowAnalysis
Throwable
types that
the specified throw instruction might throw implicitly, that is,
the possible types of errors which might arise in the course
of executing the throw
instruction, rather than
the type of the throw
's operand.
mightThrowImplicitly
in interface ThrowAnalysis
mightThrowImplicitly
in class AbstractThrowAnalysis
t
- ThrowStmt
whose implicit exceptions are
to be returned.
t
might throw implicitly.public ThrowableSet mightThrowImplicitly(ThrowStmt t)
ThrowAnalysis
Throwable
types that
the specified throw statement might throw implicitly, that is,
the possible types of errors which might arise in the course
of executing the throw
statement, rather than
the type of the throw
's operand.
mightThrowImplicitly
in interface ThrowAnalysis
mightThrowImplicitly
in class AbstractThrowAnalysis
t
- ThrowStmt
whose implicit exceptions are
to be returned.
t
might throw implicitly.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |