boolean (@NotNull PsiElement element) { return switch (getKind()) { case PACKAGE_REFERENCE -> referencesPackage(element); case REFERENCE -> referencesPackage(element) || element instanceof PsiClass && resolvesTo(element); case IMPORT_REFERENCE -> ((element instanceof PsiClass || element instanceof PsiField) && checkName((PsiNamedElement)element) && resolvesTo(element)) || (element instanceof PsiMethod && checkPropertyName((PsiNamedElement)element) && multiResolvesTo(element)) || (element instanceof PsiPackage && referencesPackage(element)); }; }