public static void printDataItems(StringBuilder sb, List<? extends DataItem> items) {
    for (DataItem item : items) {
      printTypeRef(sb, item.getType());
      sb.append(" ");
      sb.append(item.getName());
      if (item.isOptional()) {
        sb.append("?");
      }
      sb.append(", ");
    }

    if (!items.isEmpty()) {
      sb.deleteCharAt(sb.length() - 1);
      sb.deleteCharAt(sb.length() - 1);
    }
  }