FileDocCategorySizeDatePackage
ExceptionTable.javaAPI DocGlassfish v2 API3478Fri May 04 22:34:28 BST 2007com.sun.jdo.api.persistence.enhancer.classfile

ExceptionTable

public class ExceptionTable extends Object
ExceptionTable represents the exception handlers within the code of a method.

Fields Summary
private Vector
theVector
Constructors Summary
public ExceptionTable()

 
Methods Summary
public voidaddElement(ExceptionRange range)
Add an exception handler to the list

    theVector.addElement(range);
  
public java.util.Enumerationhandlers()
Return an enumeration of the exception handlers Each element in the enumeration is an ExceptionRange


  /* public accessors */

                    
     
    return theVector.elements();
  
voidprint(java.io.PrintStream out, int indent)

    ClassPrint.spaces(out, indent);
    out.println("Exception Table: ");//NOI18N
    for (int i=0; i<theVector.size(); i++)
      ((ExceptionRange) theVector.elementAt(i)).print(out, indent+2);
  
static com.sun.jdo.api.persistence.enhancer.classfile.ExceptionTableread(java.io.DataInputStream data, CodeEnv env)

    ExceptionTable excTable = new ExceptionTable();
    int nExcepts = data.readUnsignedShort();
    while (nExcepts-- > 0) {
      excTable.addElement(ExceptionRange.read(data, env));
    }
    return excTable;
  
voidwrite(java.io.DataOutputStream out)

    out.writeShort(theVector.size());
    for (int i=0; i<theVector.size(); i++)
      ((ExceptionRange) theVector.elementAt(i)).write(out);