boolean (@Nullable PsiModifierListOwner owner) { if (owner == null) return false; if (owner instanceof PsiClass && ClassUtil.isTopLevelClass((PsiClass)owner)) return true; PsiModifierList modifierList = owner.getModifierList(); return modifierList != null && modifierList.hasModifierProperty(PsiModifier.STATIC); }