joeq.Compiler.Analysis.IPA
Class ExceptionAnalysis

java.lang.Object
  extended by joeq.Compiler.Analysis.IPA.ExceptionAnalysis

public class ExceptionAnalysis
extends java.lang.Object

Uses a call graph to figure out what exceptions can be thrown by a method invocation.

Version:
$Id: ExceptionAnalysis.java,v 1.3 2004/09/22 22:17:30 joewhaley Exp $
Author:
John Whaley

Constructor Summary
ExceptionAnalysis(CallGraph cg)
          Construct exception analysis using the given call graph.
 
Method Summary
 java.util.Set getThrownExceptions(jq_Method method)
          Return the set of exception types that can be thrown by this method.
 java.util.Set getThrownExceptions(ProgramLocation callSite)
          Return the set of exception types that can be thrown by this call.
 boolean getThrownExceptions(ProgramLocation callSite, java.util.Set s, ExceptionHandlerList ex)
          Add the set of exception types that can be thrown by this call and that are not caught by the given exception handlers to the given set.
static void main(java.lang.String[] args)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExceptionAnalysis

public ExceptionAnalysis(CallGraph cg)
Construct exception analysis using the given call graph.

Method Detail

getThrownExceptions

public java.util.Set getThrownExceptions(ProgramLocation callSite)
Return the set of exception types that can be thrown by this call.

Parameters:
callSite - call site
Returns:
set of exception types

getThrownExceptions

public boolean getThrownExceptions(ProgramLocation callSite,
                                   java.util.Set s,
                                   ExceptionHandlerList ex)
Add the set of exception types that can be thrown by this call and that are not caught by the given exception handlers to the given set. Returns true iff the set changed.

Parameters:
callSite - call site
s - set
ex - exception handler list
Returns:
whether set changed

getThrownExceptions

public java.util.Set getThrownExceptions(jq_Method method)
Return the set of exception types that can be thrown by this method.

Parameters:
method -
Returns:
set of exception types

main

public static void main(java.lang.String[] args)
                 throws java.io.IOException
Throws:
java.io.IOException