Example #1
0
 @Override
 public void visitTableSwitchInsn(final int min, final int max,
         final Label dflt, final Label... labels) {
     checkStartCode();
     checkEndCode();
     if (max < min) {
         throw new IllegalArgumentException("Max = " + max
                 + " must be greater than or equal to min = " + min);
     }
     checkLabel(dflt, false, "default label");
     checkNonDebugLabel(dflt);
     if (labels == null || labels.length != max - min + 1) {
         throw new IllegalArgumentException(
                 "There must be max - min + 1 labels");
     }
     for (int i = 0; i < labels.length; ++i) {
         checkLabel(labels[i], false, "label at index " + i);
         checkNonDebugLabel(labels[i]);
     }
     super.visitTableSwitchInsn(min, max, dflt, labels);
     for (Label label : labels) {
         usedLabels.add(label);
     }
     ++insnCount;
 }