List<LookupElement> () { boolean prioritize = myParameters.getCompletionType() != CompletionType.SMART; List<LookupElement> result = new ArrayList<>(); PsiType functionalInterfaceParamType = mySubstitutor.substitute(myParams[0].getType()); PsiClass paramClass = PsiUtil.resolveClassInClassTypeOnly(functionalInterfaceParamType); if (paramClass != null) { final Set<String> visited = new HashSet<>(); for (PsiMethod psiMethod : paramClass.getAllMethods()) { PsiClass containingClass = psiMethod.getContainingClass(); PsiClass qualifierClass = containingClass != null ? containingClass : paramClass; if (!psiMethod.hasModifierProperty(PsiModifier.STATIC) && hasAppropriateReturnType(psiMethod) && isSignatureAppropriate(psiMethod, 1, paramClass) && visited.add(psiMethod.getName())) { LookupElement methodRefLookupElement = createMethodRefOnClass(psiMethod, qualifierClass); if (prioritize && containingClass == paramClass) { methodRefLookupElement = PrioritizedLookupElement.withExplicitProximity(methodRefLookupElement, 1); } result.add(methodRefLookupElement); } } } return result; }