Class Exceptions

  extended by polyglot.types.reflect.Attribute
      extended by polyglot.types.reflect.Exceptions

public class Exceptions
extends Attribute

Exceptions describes the types of exceptions that a method may throw. The Exceptions attribute stores a list of indices into the constant pool of the types of exceptions thrown by the method.

Nate Nystrom (nystrom@cs.purdue.edu)
See Also:

Field Summary
Fields inherited from class polyglot.types.reflect.Attribute
length, nameIndex
Constructor Summary
Exceptions(ClassFile clazz, java.io.DataInputStream in, int nameIndex, int length)
Exceptions(ClassFile clazz, int nameIndex, int[] exceptions)
          Constructor for create an Exceptions from scratch.
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public Exceptions(ClassFile clazz,
                  int nameIndex,
                  int[] exceptions)
Constructor for create an Exceptions from scratch.

nameIndex - The index of the UTF8 string "Exceptions" in the class's constant pool
exceptions - A non-null array of indices into the constant pool for the types of the exceptions


public Exceptions(ClassFile clazz,
                  java.io.DataInputStream in,
                  int nameIndex,
                  int length)
           throws java.io.IOException
Constructor. Create an Exceptions attribute from a data stream.

in - The data stream of the class file.
nameIndex - The index into the constant pool of the name of the attribute.
length - The length of the attribute, excluding the header.
java.io.IOException - If an error occurs while reading.