private @NotNull Collection<String> doSuggestNamesByType(@NotNull PsiType type, final @NotNull VariableKind variableKind) {
    String fromTypeMap = suggestNameFromTypeMap(type, variableKind, getLongTypeName(type));
    if (fromTypeMap != null && type instanceof PsiPrimitiveType) {
      return Collections.singletonList(fromTypeMap);
    }
    final Collection<String> suggestions = new LinkedHashSet<>();
    if (fromTypeMap != null) {
      suggestions.add(fromTypeMap);
    }

    List<String> fromTypeName = suggestNamesFromTypeName(type, variableKind, getTypeName(type));
    if (!(type instanceof PsiClassType classType)) {
      suggestions.addAll(fromTypeName);
      return suggestions;
    }

    suggestNamesForCollectionInheritors(classType, suggestions);
    suggestFromOptionalContent(variableKind, classType, suggestions);
    suggestNamesFromGenericParameters(classType, suggestions);
    suggestions.addAll(fromTypeName);
    suggestNamesFromHierarchy(classType, suggestions);
    return suggestions;
  }
private @NotNull Collection<String> doSuggestNamesByType(@NotNull PsiType type, final @NotNull VariableKind variableKind)