private static SearchScope getClassUseScopeIfApplicable(PsiMember member, PsiClass aClass, int accessLevel) {
    if (aClass == null) return null;
    final PsiModifierList classModifierList = aClass.getModifierList();
    if (classModifierList == null) return null;
    if (classModifierList.hasModifierProperty(PsiModifier.FINAL) ||
        member instanceof PsiMethod && ((PsiMethod)member).isConstructor()) {
      // constructors and members of final classes cannot be accessed via a subclass so their use scope can't be wider than their class's
      return (PsiUtil.getAccessLevel(classModifierList) < accessLevel) ? aClass.getUseScope() : null;
    }
    else if (!mayHaveScopeWideningSubclass(aClass)) {
      return aClass.getUseScope();
    }
    // class use scope doesn't matter, since another very visible class can inherit from aClass
    return null;
  }
private static SearchScope getClassUseScopeIfApplicable(PsiMember member, PsiClass aClass, int accessLevel)