PsiMethod (GroovyResolveResult @NotNull [] results) { if (results.length != 1) return null; final PsiElement element = results[0].getElement(); return element instanceof PsiMethod ? (PsiMethod) element : null; }