soot.toolkits.exceptions
Interface ThrowAnalysis

All Known Implementing Classes:
AbstractThrowAnalysis, PedanticThrowAnalysis, UnitThrowAnalysis

public interface ThrowAnalysis

A source of information about the exceptions that Units might throw.

The Units corresponding to athrow instructions may throw exceptions either explicitly—because the exception is the athrow's argument— or implicitly—because some error arises in the course of executing the instruction (only implicit exceptions are possible for bytecode instructions other than athrow). The mightThrowExplicitly() and mightThrowImplicitly() methods allow analyses to exploit any extra precision that may be gained by distinguishing between an athrow's implicit and explicit exceptions.


Method Summary
 ThrowableSet mightThrow(Unit u)
          Returns a set representing the Throwable types that the specified unit might throw.
 ThrowableSet mightThrowExplicitly(ThrowInst t)
          Returns a set representing the Throwable types that the specified throw instruction might throw explicitly, that is, the possible types for its Throwable argument.
 ThrowableSet mightThrowExplicitly(ThrowStmt t)
          Returns a set representing the Throwable types that the specified throw statement might throw explicitly, that is, the possible types for its Throwable argument.
 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.
 

Method Detail

mightThrow

ThrowableSet mightThrow(Unit u)
Returns a set representing the Throwable types that the specified unit might throw.

Parameters:
u - Unit whose exceptions are to be returned.
Returns:
a representation of the Throwable types that u might throw.

mightThrowExplicitly

ThrowableSet mightThrowExplicitly(ThrowInst t)
Returns a set representing the Throwable types that the specified throw instruction might throw explicitly, that is, the possible types for its Throwable argument.

Parameters:
t - ThrowInst whose explicit exceptions are to be returned.
Returns:
a representation of the possible types of t's Throwable operand.

mightThrowExplicitly

ThrowableSet mightThrowExplicitly(ThrowStmt t)
Returns a set representing the Throwable types that the specified throw statement might throw explicitly, that is, the possible types for its Throwable argument.

Parameters:
t - ThrowStmt whose explicit exceptions are to be returned.
Returns:
a representation of the possible types of t's Throwable operand.

mightThrowImplicitly

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.

Parameters:
t - ThrowStmt whose implicit exceptions are to be returned.
Returns:
a representation of the types of exceptions that t might throw implicitly.

mightThrowImplicitly

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.

Parameters:
t - ThrowStmt whose implicit exceptions are to be returned.
Returns:
a representation of the types of exceptions that t might throw implicitly.