boolean (final PsiMethod method, final boolean acceptStatic, final @NonNls @PsiModifier.ModifierConstant String @NotNull [] visibilityLevels) { if ((!acceptStatic && method.hasModifierProperty(PsiModifier.STATIC)) || !ContainerUtil.exists(visibilityLevels, it -> method.hasModifierProperty(it))) { return true; } PsiClass psiClass = method.getContainingClass(); if (psiClass == null) return false; final String className = psiClass.getQualifiedName(); return CommonClassNames.JAVA_LANG_OBJECT.equals(className); }