public static boolean canAccessProtectedMember(@NotNull PsiMember member,
                                                  @NotNull PsiClass memberClass,
                                                  @Nullable PsiClass accessObjectClass, @Nullable PsiClass contextClass, boolean isStatic) {
    while (contextClass != null) {
      if (InheritanceUtil.isInheritorOrSelf(contextClass, memberClass, true)) {
        if (member instanceof PsiClass || isStatic || accessObjectClass == null
            || InheritanceUtil.isInheritorOrSelf(accessObjectClass, contextClass, true)) {
          return true;
        }
      }

      contextClass = getContextClass(contextClass);
    }
    return false;
  }
public static boolean canAccessProtectedMember(@NotNull PsiMember member,
                                                  @NotNull PsiClass memberClass,
                                                  @Nullable PsiClass accessObjectClass, @Nullable PsiClass contextClass, boolean isStatic)