LocalQuickFix (Object... infos) { final PsiClass aClass = (PsiClass)infos[0]; if (CloneUtils.isDirectlyCloneable(aClass)) { final RemoveCloneableFix fix = RemoveCloneableFix.create(aClass); if (fix != null) { return fix; } } final boolean hasOwnCloneMethod = ContainerUtil.exists(aClass.findMethodsByName("clone", false), CloneUtils::isClone); if (hasOwnCloneMethod) { return null; } final boolean hasParentFinalCloneMethod = ContainerUtil.exists(aClass.findMethodsByName("clone", true), m -> CloneUtils.isClone(m) && m.hasModifierProperty(PsiModifier.FINAL)); if (hasParentFinalCloneMethod) { return null; } return new CreateExceptionCloneMethodFix(); }