KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > sli > kim > classfile > ExceptionInfo


1 package sli.kim.classfile;
2
3 import java.io.*;
4
5 /**
6 * A class for storing information about the exception table of a method.
7 * This class represents one row in the ExceptionTable.
8 *
9 * @see sli.kim.classfile.CodeInfo#setExceptionTable()
10 */

11 public class ExceptionInfo {
12     public short startPC, endPC, handlerPC;
13     public String JavaDoc catchType;
14
15     /**
16     * Construct an ExceptionInfo
17     *
18     * @param startPC the index of the first instruction in the try block (that is,
19     * startPC is inclusive).
20     * @param endPC the index of the first instruction not in the try block (that is,
21     * endPC is exclusive). If the try block extends to the end of the method,
22     * endPC will be equal to the length of the bytecode for the method.
23     * @param handlerPC the index of the first instruction of the catch handler.
24     * @param catchType the name of the exception class caught by the catch
25     * handler. If this parameter is null, the handler catches all exceptions (this
26     * is used for finally blocks).
27     */

28     public ExceptionInfo(short startPC, short endPC, short handlerPC, String JavaDoc catchType)
29     {
30         this.startPC = startPC;
31         this.endPC = endPC;
32         this.handlerPC = handlerPC;
33         this.catchType = catchType;
34     }
35 }
Popular Tags