Collection<String> (@NotNull PsiType type, @NotNull final 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; }