code: public String fieldAndTypeList(List<RecordTemplateSpec.Field> fields) {
      StringBuilder sb = new StringBuilder();
      Iterator<RecordTemplateSpec.Field> iter = fields.iterator();
      while(iter.hasNext()) {
        RecordTemplateSpec.Field field = iter.next();
        sb.append(toOptionalType(field.getType(), field.getSchemaField().getOptional()));
        sb.append(" ");
        sb.append(escapeKeyword(field.getSchemaField().getName()));
        if (iter.hasNext()) sb.append(", ");
      }
      return sb.toString();
    }
docs: Returns the fields as a list of parameter declarations for inclusion in Java source. E.g.:
  
  <code>
  org.example.Record field1, List&lt;Integer&gt; field2, Map&lt;String, Integer&gt; field3, Integer field4
  </code>
  
  @param fields provides the fields to construct a parameter declaration list for.
  @return the fields as a list of parameter declarations.