1 21 package proguard.classfile.editor; 22 23 import proguard.classfile.attribute.ExceptionsAttribute; 24 25 31 public class ExceptionsEditor 32 { 33 36 public void addException(ExceptionsAttribute exceptionsAttribute, 37 int exceptionIndex) 38 { 39 int exceptionIndexTableLength = exceptionsAttribute.u2exceptionIndexTableLength; 40 int[] exceptionIndexTable = exceptionsAttribute.u2exceptionIndexTable; 41 42 if (exceptionIndexTable.length <= exceptionIndexTableLength) 44 { 45 exceptionsAttribute.u2exceptionIndexTable = new int[exceptionIndexTableLength+1]; 46 System.arraycopy(exceptionIndexTable, 0, 47 exceptionsAttribute.u2exceptionIndexTable, 0, 48 exceptionIndexTableLength); 49 exceptionIndexTable = exceptionsAttribute.u2exceptionIndexTable; 50 } 51 52 exceptionIndexTable[exceptionsAttribute.u2exceptionIndexTableLength++] = exceptionIndex; 54 } 55 } 56 | Popular Tags |