boolean (@NotNull PsiElement element) { if (element instanceof PsiClass psiClass) { return isDomElementClass(psiClass); } if (element instanceof PsiMethod psiMethod) { return isDomElementMethod(psiMethod); } return false; }