public static boolean isStaticFieldAllowed(@NotNull PsiClass aClass) {
    if (PsiUtil.isAvailable(JavaFeature.INNER_STATICS, aClass)) {
      return true;
    }
    return aClass.hasModifierProperty(PsiModifier.STATIC) || aClass.getParent() instanceof PsiJavaFile;
  }
public static boolean isStaticFieldAllowed(@NotNull PsiClass aClass)