Class UnitThrowAnalysis

  • All Implemented Interfaces:
    ThrowAnalysis
    Direct Known Subclasses:
    DalvikThrowAnalysis, DotnetThrowAnalysis

    public class UnitThrowAnalysis
    extends AbstractThrowAnalysis
    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.

    • Constructor Detail

      • UnitThrowAnalysis

        public UnitThrowAnalysis​(Singletons.Global g)
        Constructs a UnitThrowAnalysis for inclusion in Soot's global variable manager, G.
        Parameters:
        g - guarantees that the constructor may only be called from Singletons.
      • UnitThrowAnalysis

        protected UnitThrowAnalysis()
        A protected constructor for use by unit tests.
      • UnitThrowAnalysis

        protected UnitThrowAnalysis​(boolean isInterproc)