| Constructor and Description |
|---|
ExceptionsAttribute(InputStream stream,
int nameIndex,
ConstantPool pool)
Creates a new ExceptionsAttribute.
|
| Modifier and Type | Method and Description |
|---|---|
ClassConstant[] |
getExceptions()
Returns a list of the exceptions declared for this ExceptionAttribute.
|
int |
getLength()
Returns the attribute length.
|
String |
getName()
Returns the name for this Attribute.
|
String |
toString() |
void |
write(DataOutputStream output)
Writes the Attribute out in class file format.
|
public ExceptionsAttribute(InputStream stream, int nameIndex, ConstantPool pool) throws IOException
stream - the stream to read fromnameIndex - the attribute index in the constant poolpool - the constant pool to read fromIOException - if an I/O error occurs while reading the attributepublic String getName()
public int getLength()
public ClassConstant[] getExceptions()
ClassCastException - if any exception index doesn't point
to a ClassConstant. This should probably be reported, instead, as a
ClassFormatError at the time of creation of this ExceptionsAttribute.public void write(DataOutputStream output) throws IOException
Attributewrite in interface Attributeoutput - the stream to write toIOException - if an I/O error occurs while writing to the streamCopyright © 2012. All Rights Reserved.