private static String getDelegationBody(PsiMethod methodToAdd, String delegationTarget) {
    StringBuilder buffer = new StringBuilder();
    buffer.append("{\n");

    if (!PsiTypes.voidType().equals(methodToAdd.getReturnType())) {
      buffer.append("return ");
    }

    buffer.append(delegationTarget);
    buffer.append(".");
    buffer.append(methodToAdd.getName());
    buffer.append("(");
    PsiParameter[] params = methodToAdd.getParameterList().getParameters();
    for (int i = 0; i < params.length; i++) {
      PsiParameter param = params[i];
      if (i > 0) {
        buffer.append(",");
      }
      buffer.append(param.getName());
    }
    buffer.append(");\n}");
    return buffer.toString();
  }
private static String getDelegationBody(PsiMethod methodToAdd, String delegationTarget)