|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectharpoon.IR.RawClass.Attribute
harpoon.IR.RawClass.AttributeExceptions
public class AttributeExceptions
The Exceptions attribute is a variable-length
attribute used in the attributes table of a
method_info structure. The Exceptions
attribute indicates which checked exceptions a method may throw. The
must be exactly one Exceptions attribute in each
method_info structure.
Attribute,
MethodInfo| Field Summary | |
|---|---|
static String |
ATTRIBUTE_NAME
The string naming this Attribute type. |
int[] |
exception_index_table
Each nonzero value in the exception_index_table
must be a valid index into the constant_pool
table. |
| Fields inherited from class harpoon.IR.RawClass.Attribute |
|---|
attribute_name_index, parent |
| Constructor Summary | |
|---|---|
AttributeExceptions(ClassFile parent,
int attribute_name_index,
int[] exception_index_table)
Constructor. |
|
| Method Summary | |
|---|---|
long |
attribute_length()
The value of the attribute_length item indicates
the length of the attribute, excluding the initial six bytes. |
ConstantClass |
exception_index_table(int i)
Returns the CONSTANT_Class_info corresponding to an entry in the exception_index_table. |
int |
number_of_exceptions()
|
void |
print(PrintWriter pw,
int indent)
Pretty-print the contents of this attribute. |
void |
write(ClassDataOutputStream out)
Write to bytecode stream. |
| Methods inherited from class harpoon.IR.RawClass.Attribute |
|---|
attribute_name_index, attribute_name, read, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final String ATTRIBUTE_NAME
Attribute type.
public int[] exception_index_table
exception_index_table
must be a valid index into the constant_pool
table. For each table item, if
exception_index_table[i] != 0, where 0 <= i <
number_of_exceptions, then the constant_pool
entry at index exception_index_table[i] must be a
CONSTANT_Class_info structure representing a class
type that this method is declared to throw.
| Constructor Detail |
|---|
public AttributeExceptions(ClassFile parent,
int attribute_name_index,
int[] exception_index_table)
| Method Detail |
|---|
public long attribute_length()
Attributeattribute_length item indicates
the length of the attribute, excluding the initial six bytes.
attribute_length in class Attributepublic int number_of_exceptions()
public ConstantClass exception_index_table(int i)
null if the
entry is zero.
public void write(ClassDataOutputStream out)
throws IOException
write in class AttributeIOException
public void print(PrintWriter pw,
int indent)
print in class Attributeindent - the indentation level to use.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||