edu.wisc.cs.java
Class ExceptionInfo

java.lang.Object
  |
  +--edu.wisc.cs.java.ExceptionInfo

public class ExceptionInfo
extends java.lang.Object

This class represents an Exception_Info table. This table contains the information about ranges of bytecodes which are covered by exception handlers.


Field Summary
protected  char catch_type
          The type of exception handled.
protected  CodeLabel end_pc
          The label of the last instruction covered by this handler.
protected  CodeLabel handler_pc
          The label of first instruction of the exception handler.
protected  CodeLabel start_pc
          The label of the first instruction covered by this handler.
 
Constructor Summary
ExceptionInfo(java.io.DataInputStream in)
          Constructs a new ExceptionInfo from data read from stream.
 
Method Summary
 CodeLabel getEndPC()
          Returns the label corresponding to the end of a try block.
 CodeLabel getHandlerPC()
          Returns the label corresponding to the start of a catch block.
 CodeLabel getStartPC()
          Returns the label corresponding to the start of a try block.
 void writeTo(java.io.DataOutputStream out, java.util.HashMap labels)
          Writes a ExceptionInfo table to a stream in the specified format.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

start_pc

protected CodeLabel start_pc
The label of the first instruction covered by this handler.

end_pc

protected CodeLabel end_pc
The label of the last instruction covered by this handler.

handler_pc

protected CodeLabel handler_pc
The label of first instruction of the exception handler.

catch_type

protected char catch_type
The type of exception handled.
Constructor Detail

ExceptionInfo

public ExceptionInfo(java.io.DataInputStream in)
              throws java.io.IOException
Constructs a new ExceptionInfo from data read from stream.
Parameters:
in - a stream from which to read the data for the new object.
Throws:
java.io.IOException - if there is a problem reading from the stream.
Method Detail

getStartPC

public CodeLabel getStartPC()
Returns the label corresponding to the start of a try block.
Returns:
the label corresponding to the start of a try block.

getEndPC

public CodeLabel getEndPC()
Returns the label corresponding to the end of a try block.
Returns:
the label corresponding to the end of a try block.

getHandlerPC

public CodeLabel getHandlerPC()
Returns the label corresponding to the start of a catch block.
Returns:
the label corresponding to the start of a catch block.

writeTo

public void writeTo(java.io.DataOutputStream out,
                    java.util.HashMap labels)
             throws java.io.IOException
Writes a ExceptionInfo table to a stream in the specified format.
Parameters:
out - a stream to which to write the data for this table.
labels - a map comtaining the labels in the method and their pc's.
Throws:
java.io.IOException - if there is a problem writing to the stream.