void (StringBuilder result, PsiClass psiClass, PsiRecordComponent @NotNull [] components) { boolean hasEquals = false, hasHashCode = false, hasToString = false; for (PsiMethod method : psiClass.getMethods()) { if (method instanceof SyntheticElement && JavaPsiRecordUtil.getRecordComponentForAccessor(method) != null) { result.append(method.getText()).append("\n"); } hasEquals |= MethodUtils.isEquals(method); hasHashCode |= MethodUtils.isHashCode(method); hasToString |= MethodUtils.isToString(method); } if (!hasEquals) { result.append(generateEquals(psiClass, components)); } if (!hasHashCode) { result.append(generateHashCode(components)); } if (!hasToString) { result.append(generateToString(psiClass, components)); } }