Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

Compil3r.Quad
Class ExceptionHandler  view ExceptionHandler download ExceptionHandler.java

java.lang.Object
  extended byCompil3r.Quad.ExceptionHandler

public class ExceptionHandler
extends java.lang.Object

Exception handler for basic blocks. Each exception handler handles a type of exception. When an exception is raised at run time, a routine looks up the list of exception handlers that guard the location where the exception was raised. It checks each of the exception handlers in order. Control flow branches to the first exception handler whose type matches the type of the raised exception. Note that the type check is a Java "assignable" type check, and therefore inheritance and interface checks may be necessary.

Version:
$Id: ExceptionHandler.java,v 1.11 2003/05/12 10:05:16 joewhaley Exp $

Field Summary
private  BasicBlock entry
          Exception handler entry point.
private  Clazz.jq_Class exception_type
          Type of exception that this exception handler catches.
private  java.util.List handled_blocks
          List of handled basic blocks.
 
Constructor Summary
(package private) ExceptionHandler(Clazz.jq_Class ex_type)
           
  ExceptionHandler(Clazz.jq_Class ex_type, int numOfHandledBlocks, BasicBlock entry)
          Creates new ExceptionHandler.
 
Method Summary
(package private)  void addHandledBasicBlock(BasicBlock bb)
          Add a handled basic block to the list of handled basic blocks.
 BasicBlock getEntry()
          Returns the entry point for this exception handler.
 Clazz.jq_Class getExceptionType()
          Returns the type of exception that this exception handler catches.
 Util.Templates.List.BasicBlock getHandledBasicBlocks()
          Returns an iteration of the handled basic blocks.
 boolean mayCatch(Clazz.jq_Class exType)
           
 boolean mustCatch(Clazz.jq_Class exType)
           
 void setEntry(BasicBlock entry)
           
 java.lang.String toString()
          Convert this Object to a human-readable String.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

exception_type

private Clazz.jq_Class exception_type
Type of exception that this exception handler catches.


handled_blocks

private java.util.List handled_blocks
List of handled basic blocks.


entry

private BasicBlock entry
Exception handler entry point.

Constructor Detail

ExceptionHandler

public ExceptionHandler(Clazz.jq_Class ex_type,
                        int numOfHandledBlocks,
                        BasicBlock entry)
Creates new ExceptionHandler.


ExceptionHandler

ExceptionHandler(Clazz.jq_Class ex_type)
Method Detail

getExceptionType

public Clazz.jq_Class getExceptionType()
Returns the type of exception that this exception handler catches.


getHandledBasicBlocks

public Util.Templates.List.BasicBlock getHandledBasicBlocks()
Returns an iteration of the handled basic blocks.


getEntry

public BasicBlock getEntry()
Returns the entry point for this exception handler.


setEntry

public void setEntry(BasicBlock entry)

mustCatch

public boolean mustCatch(Clazz.jq_Class exType)

mayCatch

public boolean mayCatch(Clazz.jq_Class exType)

toString

public java.lang.String toString()
Description copied from class: java.lang.Object
Convert this Object to a human-readable String. There are no limits placed on how long this String should be or what it should contain. We suggest you make it as intuitive as possible to be able to place it into System.out.println() 55 and such.

It is typical, but not required, to ensure that this method never completes abruptly with a java.lang.RuntimeException.

This method will be called when performing string concatenation with this object. If the result is null, string concatenation will instead use "null".

The default implementation returns getClass().getName() + "@" + Integer.toHexString(hashCode()).


addHandledBasicBlock

void addHandledBasicBlock(BasicBlock bb)
Add a handled basic block to the list of handled basic blocks.