public final int getIndex() {
    if (index < 0) {
      throw new RuntimeException("index not yet set");
    }

    return index;
  }
Gets the item index.

@return {@code >= 0;} the index
@throws RuntimeException thrown if the item index is not yet assigned
android/android_framework/dex-maker/src/main/java/com/android/dx/dex/file/IndexedItem.java