public synchronized MethodIdItem intern(CstBaseMethodRef method) {
    if (method == null) {
      throw new NullPointerException("method == null");
    }

    throwIfPrepared();

    MethodIdItem result = methodIds.get(method);

    if (result == null) {
      result = new MethodIdItem(method);
      methodIds.put(method, result);
    }

    return result;
  }
Interns an element into this instance.

@param method {@code non-null;} the reference to intern
@return {@code non-null;} the interned reference
android/android_framework/dex-maker/src/main/java/com/android/dx/dex/file/MethodIdsSection.java