joeq.Compiler.Analysis.IPA
Class ExceptionAnalysis

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

public class ExceptionAnalysis
extends Object

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

Version:
$Id: ExceptionAnalysis.java 1931 2004-09-22 22:17:47Z joewhaley $
Author:
John Whaley

Constructor Summary
ExceptionAnalysis(CallGraph cg)
          Construct exception analysis using the given call graph.
 
Method Summary
 Set getThrownExceptions(jq_Method method)
          Return the set of exception types that can be thrown by this method.
 Set getThrownExceptions(ProgramLocation callSite)
          Return the set of exception types that can be thrown by this call.
 boolean getThrownExceptions(ProgramLocation callSite, 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(String[] args)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, 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 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,
                                   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 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(String[] args)
                 throws IOException
Throws:
IOException


Copyright © 2001-2008 John Whaley. All Rights Reserved.