boolean (@NotNull PsiElement psiElement) { if (psiElement instanceof PsiClass psiClass) { return isServiceOrExported(psiClass); } return psiElement instanceof PsiMethod method && (isDefaultConstructor(method) || isProviderMethod(method)) && isServiceOrExported(method.getContainingClass()); }