void (@NotNull PsiMethod psiMethod, @NotNull ProblemsHolder holder, @NotNull Supplier<PsiElement> anchorSupplier) { PsiClass containingClass = psiMethod.getContainingClass(); if (containingClass == null) return; if (!CommonClassNames.JAVA_IO_FILE.equals(containingClass.getQualifiedName())) return; if (!DevKitInspectionUtil.isClassAvailable(holder, FileUtil.class.getName())) return; PsiElement anchor = anchorSupplier.get(); if (anchor == null) return; holder.registerProblem(anchor, DevKitBundle.message("inspections.file.equals.method")); }