void (@NotNull PsiMethod method) { if (method.isConstructor()) { return; } if (method.getNameIdentifier() == null) { return; } final PsiParameterList parameterList = method.getParameterList(); final int parameterCount = parameterList.getParametersCount(); if (parameterCount == 0) { return; } final PsiClass aClass = method.getContainingClass(); if (aClass == null) { return; } if (MethodUtils.hasSuper(method)) { return; } final String methodName = method.getName(); final PsiMethod[] sameNameMethods = aClass.findMethodsByName(methodName, false); for (PsiMethod sameNameMethod : sameNameMethods) { if (method.equals(sameNameMethod)) { continue; } final PsiParameterList otherParameterList = sameNameMethod.getParameterList(); if (parameterCount == otherParameterList.getParametersCount()) { if (ignoreInconvertibleTypes && !areParameterTypesConvertible(parameterList, otherParameterList)) { return; } registerMethodError(method); return; } } }