public static PsiElement @NotNull [] mapElements(ResolveResult @NotNull [] candidates) {
    PsiElement[] result = new PsiElement[candidates.length];
    for (int i = 0; i < candidates.length; i++) {
      result[i] = candidates[i].getElement();
    }
    return result;
  }
public static PsiElement @NotNull [] mapElements(ResolveResult @NotNull [] candidates)