EDU.purdue.cs.bloat.file
Class Exceptions

java.lang.Object
  |
  +--EDU.purdue.cs.bloat.file.Attribute
        |
        +--EDU.purdue.cs.bloat.file.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 typs of exceptions thrown by the method.

See Also:
Method

Fields inherited from class EDU.purdue.cs.bloat.file.Attribute
length, nameIndex
 
Constructor Summary
Exceptions(ClassInfo classInfo, java.io.DataInputStream in, int nameIndex, int length)
          Constructor.
 
Method Summary
 java.lang.Object clone()
           
 int[] exceptionTypes()
          Get the indices into the constant pool of the types of the exceptions thrown by this method.
 int length()
          Get the length of the attribute.
 java.lang.String toString()
          Returns a string representation of the attribute.
 void writeData(java.io.DataOutputStream out)
          Write the attribute to a data stream.
 
Methods inherited from class EDU.purdue.cs.bloat.file.Attribute
nameIndex
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Exceptions

public Exceptions(ClassInfo classInfo,
                  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.
Method Detail

writeData

public void writeData(java.io.DataOutputStream out)
               throws java.io.IOException
Write the attribute to a data stream.
Overrides:
writeData in class Attribute
Parameters:
out - The data stream of the class file.
Throws:
java.io.IOException - If an error occurs while writing.

exceptionTypes

public int[] exceptionTypes()
Get the indices into the constant pool of the types of the exceptions thrown by this method.
Returns:
The indices of the types of the exceptions thrown.

length

public int length()
Get the length of the attribute.
Overrides:
length in class Attribute

clone

public java.lang.Object clone()
Overrides:
clone in class Attribute

toString

public java.lang.String toString()
Returns a string representation of the attribute.
Overrides:
toString in class Attribute