soot.toolkits.exceptions
Class PedanticThrowAnalysis

java.lang.Object
  extended by soot.toolkits.exceptions.AbstractThrowAnalysis
      extended by soot.toolkits.exceptions.PedanticThrowAnalysis
All Implemented Interfaces:
ThrowAnalysis

public class PedanticThrowAnalysis
extends AbstractThrowAnalysis

A ThrowAnalysis that says that every unit can throw every possible exception type. Strictly speaking, this is correct, since the deprecated Thread.stop(Throwable) method allows one thread to cause any Throwable it wants to be thrown in another thread, meaning that all Throwables may arrive asynchronously from the perspective of the victim thread.


Constructor Summary
PedanticThrowAnalysis(Singletons.Global g)
          Constructs a PedanticThrowAnalysis for inclusion in Soot's global variable manager, G.
 
Method Summary
 ThrowableSet mightThrow(Unit u)
          Returns the set of all Throwables as the set of types that the specified unit might throw, regardless of the unit's identity.
 ThrowableSet mightThrowImplicitly(ThrowInst t)
          Returns the set of all Throwables as the set of types that a throw instruction may 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 the set of all Throwables as the set of types that a throw statement may 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 PedanticThrowAnalysis v()
          Returns the single instance of PedanticThrowAnalysis.
 
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

PedanticThrowAnalysis

public PedanticThrowAnalysis(Singletons.Global g)
Constructs a PedanticThrowAnalysis for inclusion in Soot's global variable manager, G.

Parameters:
g - guarantees that the constructor may only be called from Singletons.
Method Detail

v

public static PedanticThrowAnalysis v()
Returns the single instance of PedanticThrowAnalysis.

Returns:
Soot's PedanticThrowAnalysis.

mightThrow

public ThrowableSet mightThrow(Unit u)
Returns the set of all Throwables as the set of types that the specified unit might throw, regardless of the unit's identity.

Specified by:
mightThrow in interface ThrowAnalysis
Specified by:
mightThrow in class AbstractThrowAnalysis
Parameters:
u - Unit whose exceptions are to be returned.
Returns:
the set of all Throwables.

mightThrowImplicitly

public ThrowableSet mightThrowImplicitly(ThrowInst t)
Returns the set of all Throwables as the set of types that a throw instruction may 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.

Specified by:
mightThrowImplicitly in interface ThrowAnalysis
Specified by:
mightThrowImplicitly in class AbstractThrowAnalysis
Parameters:
t - the ThrowInst whose exceptions are to be returned.
Returns:
the set of all Throwables.

mightThrowImplicitly

public ThrowableSet mightThrowImplicitly(ThrowStmt t)
Returns the set of all Throwables as the set of types that a throw statement may 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.

Specified by:
mightThrowImplicitly in interface ThrowAnalysis
Specified by:
mightThrowImplicitly in class AbstractThrowAnalysis
Parameters:
t - the ThrowStmt whose exceptions are to be returned.
Returns:
the set of all Throwables.