code: private static void attachJSDocInfoToNominalTypeOrShape(
        ObjectType objType, JSDocInfo docInfo, @Nullable String qName) {
  
      if (objType.isConstructor() || objType.isInterface()) {
        if (!isReferenceNameOf(objType, qName)) {
          return;
        }
  
        objType.setJSDocInfo(docInfo);
        JSType.toMaybeFunctionType(objType).getInstanceType().setJSDocInfo(docInfo);
      } else if (objType.isEnumType()) {
        // Given: `/** @enum {number} */ MyEnum = { FOO: 0 };`
        // Then: typeOf(MyEnum).referenceName() == "enum{MyEnum}"
        // Then: typeOf(MyEnum.FOO).referenceName() == "MyEnum"
        ObjectType elementType = objType.toMaybeEnumType().getElementsType();
        if (!isReferenceNameOf(elementType, qName)) {
          return;
        }
  
        objType.setJSDocInfo(docInfo);
        elementType.setJSDocInfo(docInfo);
      } else if (!objType.isNativeObjectType() && objType.isFunctionType()) {
        // Anonymous function types identified by their parameter and return types. Remember there can
        // be many unique but equal instances.
        objType.setJSDocInfo(docInfo);
      }
    }
docs: Handle cases #1 and #3 in the class doc.