public IntList toTargetList(int noException) {
    if (noException < -1) {
      throw new IllegalArgumentException("noException < -1");
    }

    boolean hasDefault = (noException >= 0);
    int sz = size();

    if (sz == 0) {
      if (hasDefault) {
        /*
         * The list is empty, but there is a no-exception
         * address; so, the result is just that address.
         */
        return IntList.makeImmutable(noException);
      }
      /*
       * The list is empty and there isn't even a no-exception
       * address.
       */
      return IntList.EMPTY;
    }

    IntList result = new IntList(sz + (hasDefault ? 1 : 0));

    for (int i = 0; i < sz; i++) {
      result.add(get(i).getHandlerPc());
    }

    if (hasDefault) {
      result.add(noException);
    }

    result.setImmutable();
    return result;
  }
Returns a target list corresponding to this instance. The result is a list of all the exception
handler addresses, with the given {@code noException} address appended if appropriate. The
result is automatically made immutable.

@param noException {@code >= -1;} the no-exception address to append, or {@code -1} not to
    append anything
@return {@code non-null;} list of exception targets, with {@code noException} appended if
    necessary
android/android_framework/dex-maker/src/main/java/com/android/dx/cf/code/ByteCatchList.java