void internIfAppropriate(Constant cst) {
    if (cst == null) {
      throw new NullPointerException("cst == null");
    }

    if (cst instanceof CstString) {
      stringIds.intern((CstString) cst);
    } else if (cst instanceof CstType) {
      typeIds.intern((CstType) cst);
    } else if (cst instanceof CstBaseMethodRef) {
      methodIds.intern((CstBaseMethodRef) cst);
    } else if (cst instanceof CstFieldRef) {
      fieldIds.intern((CstFieldRef) cst);
    } else if (cst instanceof CstEnumRef) {
      fieldIds.intern(((CstEnumRef) cst).getFieldRef());
    } else if (cst instanceof CstProtoRef) {
      protoIds.intern(((CstProtoRef) cst).getPrototype());
    } else if (cst instanceof CstMethodHandle) {
      methodHandles.intern((CstMethodHandle) cst);
    }
  }
Interns the given constant in the appropriate section of this instance, or do nothing if the
given constant isn't the sort that should be interned.

@param cst {@code non-null;} constant to possibly intern
android/android_framework/dex-maker/src/main/java/com/android/dx/dex/file/DexFile.java