PsiMethod[] (@Nullable List<? extends CandidateInfo> list) { if (list == null) return PsiMethod.EMPTY_ARRAY; PsiMethod[] result = new PsiMethod[list.size()]; for (int i = 0; i < list.size(); i++) { result[i] = (PsiMethod) list.get(i).getElement(); } return result; }