public final void setIndex(int index) {
    if (this.index != -1) {
      throw new RuntimeException("index already set");
    }

    this.index = index;
  }
Sets the item index. This method may only ever be called once per instance, and this will throw
a {@code RuntimeException} if called a second (or subsequent) time.

@param index {@code >= 0;} the item index
android/android_framework/dex-maker/src/main/java/com/android/dx/dex/file/IndexedItem.java