final class DeclaredExceptionTable extends java.lang.Object implements IDeclaredExceptionTable
Modifier and Type | Field and Description |
---|---|
private IntVector |
m_exceptions |
Constructor and Description |
---|
DeclaredExceptionTable(int capacity) |
Modifier and Type | Method and Description |
---|---|
int |
add(int exception_index)
Appends a new exception class pointer to the collection.
|
java.lang.Object |
clone()
Performs a deep copy.
|
int |
get(int offset)
Returns the
CONSTANT_Class_info constant
pool index for offset'th exception type thrown by the method that contains
this this exception index table in its ExceptionsAttribute_info attribute. |
long |
length()
Returns the total length of this table when converted to
.class format [including 2 count bytes]
|
int |
set(int offset,
int exception_index)
Replaces exception class pointer number 'offset' with new value 'interface_index'.
|
int |
size()
Returns the number of exception types the containing method professes
to throw.
|
void |
writeInClassFormat(UDataOutputStream out) |
private IntVector m_exceptions
public int get(int offset)
IDeclaredExceptionTable
CONSTANT_Class_info
constant
pool index for offset'th exception type thrown by the method that contains
this this exception index table in its ExceptionsAttribute_info attribute.get
in interface IDeclaredExceptionTable
offset
- thrown exception class number [must be in [0, size()) range]public int size()
IDeclaredExceptionTable
size
in interface IDeclaredExceptionTable
public long length()
IDeclaredExceptionTable
length
in interface IDeclaredExceptionTable
public java.lang.Object clone()
clone
in interface IDeclaredExceptionTable
clone
in class java.lang.Object
public void writeInClassFormat(UDataOutputStream out) throws java.io.IOException
writeInClassFormat
in interface IClassFormatOutput
java.io.IOException
public int add(int exception_index)
IDeclaredExceptionTable
add
in interface IDeclaredExceptionTable
exception_index
- constant pool index [must be positive; input not validated]IDeclaredExceptionTable.size()
-1 when called
after this method]public int set(int offset, int exception_index)
IDeclaredExceptionTable
set
in interface IDeclaredExceptionTable
offset
- thrown exception class number [must be in [0, size()) range]exception_index
- constant pool index [must be positive; input not validated]