polyglot.types.reflect
Class Exceptions

java.lang.Object
  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.

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

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)
          Constructor.
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

Exceptions

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

Parameters:
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

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.

Parameters:
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.
Throws:
java.io.IOException - If an error occurs while reading.