protected boolean canSearchForOverridingMethods(PsiElement element) {
    if (!(element instanceof PsiMethod method)) return false;
    PsiClass aClass = method.getContainingClass();
    if (aClass == null) return false;
    return !(aClass instanceof PsiAnonymousClass) &&
           !aClass.hasModifierProperty(PsiModifier.FINAL) &&
           !method.isConstructor() &&
           !method.hasModifierProperty(PsiModifier.FINAL) &&
           !method.hasModifierProperty(PsiModifier.STATIC) &&
           !method.hasModifierProperty(PsiModifier.PRIVATE);
  }
protected boolean canSearchForOverridingMethods(PsiElement element)