1 package polyglot.types.reflect; 2 3 import java.util.*; 4 import java.io.*; 5 6 16 class Exceptions extends Attribute { 17 int[] exceptions; 18 ClassFile clazz; 19 20 30 Exceptions(ClassFile clazz, int nameIndex, int[] exceptions) { 31 super(nameIndex, (2 * exceptions.length) + 2); 32 this.clazz = clazz; 33 this.exceptions = exceptions; 34 } 35 36 48 Exceptions(ClassFile clazz, DataInputStream in, 49 int nameIndex, int length) throws IOException 50 { 51 super(nameIndex, length); 52 53 this.clazz = clazz; 54 55 int count = in.readUnsignedShort(); 56 57 exceptions = new int[count]; 58 59 for (int i = 0; i < count; i++) { 60 exceptions[i] = in.readUnsignedShort(); 61 } 62 } 63 } 64 | Popular Tags |