public class ExceptionsAttr extends Attribute
Constructor and Description |
---|
ExceptionsAttr(Method meth)
Add a new ExceptionsAttr to a Method.
|
Modifier and Type | Method and Description |
---|---|
void |
assignConstants(ClassType cl)
Add any needed constant pool entries for this Attribute.
|
ClassType[] |
getExceptions()
The types of the exceptions in this attr.
|
int |
getLength()
The size of this Attribute (in bytes) is 2 (for
number_of_exception) plus 2 * number_of_exceptions.
|
void |
print(ClassTypeWriter dst) |
void |
setExceptions(ClassType[] excep_types)
Set the Exceptions attribute to refer to the given exception types.
|
void |
setExceptions(short[] indices,
ClassType cl)
Set the Exceptions attribute to refer to classes whose indices
in the constant pool of `cl' are given by `indices'.
|
void |
write(java.io.DataOutputStream dstr)
Write out the contents of the Attribute.
|
addToFrontOf, assignConstants, count, get, getConstants, getContainer, getLengthAll, getName, getNameIndex, getNext, isSkipped, setContainer, setName, setNameIndex, setNext, setSkipped, setSkipped, writeAll
public ExceptionsAttr(Method meth)
public void setExceptions(short[] indices, ClassType cl)
public void setExceptions(ClassType[] excep_types)
excep_types
- the types of the exceptions.public void assignConstants(ClassType cl)
Attribute
assignConstants
in class Attribute
public final int getLength()
public final ClassType[] getExceptions()
public void write(java.io.DataOutputStream dstr) throws java.io.IOException
Attribute
public void print(ClassTypeWriter dst)