List<LookupElement> (List<LookupElement> allRefSuggestions, Set<ExpectedTypeInfo> infos) { List<LookupElement> result = new ArrayList<>(); for (LookupElement item : allRefSuggestions) { if (matchesExpectedType(item, infos)) { if (item instanceof JavaMethodCallElement) { checkTooGeneric((JavaMethodCallElement)item); } result.add(JavaSmartCompletionContributor.decorate(item, infos)); } } return result; }