Package javassist.bytecode
Class ExceptionsAttribute
java.lang.Object
javassist.bytecode.AttributeInfo
javassist.bytecode.ExceptionsAttribute
Exceptions_attribute
.-
Field Summary
FieldsFields inherited from class javassist.bytecode.AttributeInfo
constPool, info, name
-
Constructor Summary
ConstructorsModifierConstructorDescriptionConstructs a new exceptions attribute.(package private)
ExceptionsAttribute
(ConstPool cp, int n, DataInputStream in) private
ExceptionsAttribute
(ConstPool cp, ExceptionsAttribute src, Map<String, String> classnames) Constructs a copy of an exceptions attribute. -
Method Summary
Modifier and TypeMethodDescriptionMakes a copy.private void
copyFrom
(ExceptionsAttribute srcAttr, Map<String, String> classnames) Copies the contents from a source attribute.int
getException
(int nth) Returns the value ofexception_index_table[nth]
.int[]
Returnsexception_index_table[]
.String[]
Returns the names of exceptions that the method may throw.void
setExceptionIndexes
(int[] elist) Setsexception_index_table[]
.void
setExceptions
(String[] elist) Sets the names of exceptions that the method may throw.int
Returnsnumber_of_exceptions
.Methods inherited from class javassist.bytecode.AttributeInfo
copyAll, get, getConstPool, getLength, getName, getRefClasses, getRefClasses, length, lookup, read, remove, renameClass, renameClass, renameClass, renameClass, set, write, writeAll
-
Field Details
-
tag
The name of this attribute"Exceptions"
.- See Also:
-
-
Constructor Details
-
ExceptionsAttribute
ExceptionsAttribute(ConstPool cp, int n, DataInputStream in) throws IOException - Throws:
IOException
-
ExceptionsAttribute
Constructs a copy of an exceptions attribute.- Parameters:
cp
- constant pool table.src
- source attribute.
-
ExceptionsAttribute
Constructs a new exceptions attribute.- Parameters:
cp
- constant pool table.
-
-
Method Details
-
copy
Makes a copy. Class names are replaced according to the givenMap
object.- Overrides:
copy
in classAttributeInfo
- Parameters:
newCp
- the constant pool table used by the new copy.classnames
- pairs of replaced and substituted class names. It can benull
.
-
copyFrom
Copies the contents from a source attribute. Specified class names are replaced during the copy.- Parameters:
srcAttr
- source Exceptions attributeclassnames
- pairs of replaced and substituted class names.
-
getExceptionIndexes
public int[] getExceptionIndexes()Returnsexception_index_table[]
. -
getExceptions
Returns the names of exceptions that the method may throw. -
setExceptionIndexes
public void setExceptionIndexes(int[] elist) Setsexception_index_table[]
. -
setExceptions
Sets the names of exceptions that the method may throw. -
tableLength
public int tableLength()Returnsnumber_of_exceptions
. -
getException
public int getException(int nth) Returns the value ofexception_index_table[nth]
.
-