Class Exceptions
java.lang.Object
EDU.purdue.cs.bloat.file.Attribute
EDU.purdue.cs.bloat.file.Exceptions
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:
-
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionExceptions(ClassInfo classInfo, DataInputStream in, int nameIndex, int length) Constructor. -
Method Summary
-
Constructor Details
-
Exceptions
public Exceptions(ClassInfo classInfo, DataInputStream in, int nameIndex, int length) throws 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:
IOException- If an error occurs while reading.
-
-
Method Details
-
writeData
Write the attribute to a data stream.- Specified by:
writeDatain classAttribute- Parameters:
out- The data stream of the class file.- Throws:
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
-
clone
-
toString
-