void (final PsiMethod method, final String newName, final List<? super UsageInfo> result) { final PsiClass containingClass = method.getContainingClass(); if (containingClass == null) return; if (method.hasModifierProperty(PsiModifier.PRIVATE)) return; Collection<PsiClass> inheritors = ClassInheritorsSearch.search(containingClass).findAll(); MethodSignature oldSignature = method.getSignature(PsiSubstitutor.EMPTY); MethodSignature newSignature = MethodSignatureUtil.createMethodSignature(newName, oldSignature.getParameterTypes(), oldSignature.getTypeParameters(), oldSignature.getSubstitutor(), method.isConstructor()); for (PsiClass inheritor : inheritors) { PsiSubstitutor superSubstitutor = TypeConversionUtil.getSuperClassSubstitutor(containingClass, inheritor, PsiSubstitutor.EMPTY); final PsiMethod[] methodsByName = inheritor.findMethodsByName(newName, false); for (PsiMethod conflictingMethod : methodsByName) { if (newSignature.equals(conflictingMethod.getSignature(superSubstitutor))) { result.add(new SubmemberHidesMemberUsageInfo(conflictingMethod, method)); break; } } } }