PsiElementVisitor (@NotNull ProblemsHolder holder, boolean isOnTheFly) { if (!(holder.getFile() instanceof PsiClassOwner)) { return PsiElementVisitor.EMPTY_VISITOR; } return new JavaElementVisitor() { @Override public void visitMethod(@NotNull PsiMethod method) { if (method.isConstructor()) { return; } if (!isOnTheFly && MethodUtils.hasSuper(method)) { return; } if (LibraryUtil.isOverrideOfLibraryMethod(method)) { return; } String name = method.getName(); checkName(method, name, holder); } }; }