boolean (PsiMember element) { if (element instanceof final PsiMethod method) { return !method.hasModifierProperty(PsiModifier.STATIC) && !method.hasModifierProperty(PsiModifier.PRIVATE); } return element instanceof PsiClass aClass && aClass.isInterface(); }