public void setClassIndex(int index) {
    if (index < 0) {
      throw new IllegalArgumentException("index < 0");
    }

    if (this.classIndex >= 0) {
      throw new IllegalStateException("class index already set");
    }

    this.classIndex = index;
  }
Sets the constant's class index. This is the constant pool index for the class referred to by
this instance's constant. Only reference constants have a class, so it is only on instances
with reference constants that this method should ever be called. It is only valid to call this
method once per instance.

@param index {@code index >= 0;} the constant's class's constant pool index
android/android_framework/dex-maker/src/main/java/com/android/dx/dex/code/CstInsn.java