* @param patches The already generated patches.
*/
public static void generate(Attribute[] old, Attribute[] new_,
List<AttributePatch> patches){
ExceptionTable newExceptions = null;
ExceptionTable oldExceptions = null;
for(Attribute a : old){
if(a instanceof ExceptionTable){
oldExceptions = (ExceptionTable)a;
break;
}
}
for(Attribute a : new_){
if(a instanceof ExceptionTable){
newExceptions = (ExceptionTable)a;
break;
}
}
int[] newIndexes = new int[0];
String[] newStrings = new String[0];
if(newExceptions != null){
newIndexes = newExceptions.getExceptionIndexTable();
newStrings = newExceptions.getExceptionNames();
}
int[] oldIndexes = new int[0];
String[] oldStrings = new String[0];
if(oldExceptions != null){
oldIndexes = oldExceptions.getExceptionIndexTable();
oldStrings = oldExceptions.getExceptionNames();
}
List<Integer> removedIndexes = new ArrayList<Integer>();
List<Integer> addedIndexes = new ArrayList<Integer>();
// Find added