boolean (PsiMember element) { if (element instanceof PsiMethod) { if (PsiUtil.isLanguageLevel9OrHigher(element)) { return true; } return element.hasModifierProperty(PsiModifier.PUBLIC) && (PsiUtil.isLanguageLevel8OrHigher(element) || !element.hasModifierProperty(PsiModifier.STATIC)); } else if (element instanceof PsiField && !(element instanceof PsiEnumConstant)) { return element.hasModifierProperty(PsiModifier.FINAL) && element.hasModifierProperty(PsiModifier.STATIC) && element.hasModifierProperty(PsiModifier.PUBLIC); } else if (element instanceof PsiClass) { return ((PsiClass)element).isInterface() || element.hasModifierProperty(PsiModifier.STATIC); } return false; }