boolean (@NotNull GrParameter parameter, @NotNull GrMethod method) { int optionalParameterNumber = 0; for (GrParameter someParameter : method.getParameters()) { if (someParameter.isOptional()) optionalParameterNumber++; if (someParameter == parameter) break; } GrReflectedMethod[] reflectedMethods = method.getReflectedMethods(); for (int i = reflectedMethods.length - optionalParameterNumber; i < reflectedMethods.length; i++) { GrReflectedMethod reflectedMethod = reflectedMethods[i]; if (FindSuperElementsHelper.findSuperElements(reflectedMethod).length > 0) return false; if (MethodReferencesSearch.search(reflectedMethod).findFirst() != null) return false; } return true; }