< prev index next >
src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ExceptionTable.java
Print this page
@@ -33,11 +33,10 @@
* this class is <em>ExceptionTable</em> for historical reasons; The
* Java Virtual Machine Specification, Second Edition defines this
* attribute using the name <em>Exceptions</em> (which is inconsistent
* with the other classes).
*
- * @version $Id$
* @see Code
*/
public final class ExceptionTable extends Attribute {
private int[] exception_index_table; // constant pool
@@ -101,11 +100,11 @@
*
* @param file Output file stream
* @throws IOException
*/
@Override
- public final void dump( final DataOutputStream file ) throws IOException {
+ public void dump( final DataOutputStream file ) throws IOException {
super.dump(file);
file.writeShort(exception_index_table.length);
for (final int index : exception_index_table) {
file.writeShort(index);
}
@@ -113,27 +112,27 @@
/**
* @return Array of indices into constant pool of thrown exceptions.
*/
- public final int[] getExceptionIndexTable() {
+ public int[] getExceptionIndexTable() {
return exception_index_table;
}
/**
* @return Length of exception table.
*/
- public final int getNumberOfExceptions() {
+ public int getNumberOfExceptions() {
return exception_index_table == null ? 0 : exception_index_table.length;
}
/**
* @return class names of thrown exceptions
*/
- public final String[] getExceptionNames() {
+ public String[] getExceptionNames() {
final String[] names = new String[exception_index_table.length];
for (int i = 0; i < exception_index_table.length; i++) {
names[i] = super.getConstantPool().getConstantString(exception_index_table[i],
Const.CONSTANT_Class).replace('/', '.');
}
@@ -143,20 +142,20 @@
/**
* @param exception_index_table the list of exception indexes
* Also redefines number_of_exceptions according to table length.
*/
- public final void setExceptionIndexTable( final int[] exception_index_table ) {
+ public void setExceptionIndexTable( final int[] exception_index_table ) {
this.exception_index_table = exception_index_table != null ? exception_index_table : new int[0];
}
/**
* @return String representation, i.e., a list of thrown exceptions.
*/
@Override
- public final String toString() {
+ public String toString() {
final StringBuilder buf = new StringBuilder();
String str;
buf.append("Exceptions: ");
for (int i = 0; i < exception_index_table.length; i++) {
str = super.getConstantPool().getConstantString(exception_index_table[i], Const.CONSTANT_Class);
< prev index next >