List<PsiJavaCodeReferenceElement> (@NotNull PsiImportList importList, String className) { List<PsiJavaCodeReferenceElement> array = new ArrayList<>(); for (PsiImportStaticStatement staticStatement : importList.getImportStaticStatements()) { PsiClass psiClass = staticStatement.resolveTargetClass(); if (psiClass != null && Comparing.strEqual(psiClass.getQualifiedName(), className)) { array.add(staticStatement.getImportReference()); } } return array; }