GrClosureType (@NotNull Iterable<? extends GroovyResolveResult> results, @NotNull GroovyPsiElement context) { List<GrSignature> signatures = new ArrayList<>(); for (GroovyResolveResult result : results) { if (result.getElement() instanceof PsiMethod) { signatures.add(GrClosureSignatureUtil.createSignature((PsiMethod)result.getElement(), result.getSubstitutor())); } } final GlobalSearchScope resolveScope = context.getResolveScope(); final JavaPsiFacade facade = JavaPsiFacade.getInstance(context.getProject()); return create(signatures, resolveScope, facade, LanguageLevel.JDK_1_5, true); }