code: private void appendCollectionTypeField(JField field, PDescriptor descriptor) {
          switch (descriptor.getType()) {
              case BYTE:
              case BINARY:
                  writer.formatln(".addByteArrayField(\"%s\")", field.name());
                  break;
              case BOOL:
                  writer.formatln(".addBooleanArrayField(\"%s\")", field.name());
                  break;
              case DOUBLE:
                  writer.formatln(".addDoubleArrayField(\"%s\")", field.name());
                  break;
              case I16:
                  writer.formatln(".addShortArrayField(\"%s\")", field.name());
                  break;
              case I32:
              case ENUM:
                  writer.formatln(".addIntArrayField(\"%s\")", field.name());
                  break;
              case I64:
                  writer.formatln(".addLongArrayField(\"%s\")", field.name());
                  break;
              case STRING:
                  writer.formatln(".addUTFArrayField(\"%s\")", field.name());
                  break;
              case MESSAGE:
                  writer.formatln(".addPortableArrayField(\"%s\", %s(%s))",
                                  field.name(),
                                  camelCase("get", descriptor.getName() + "Definition"),
                                  PORTABLE_VERSION);
                  break;
              default:
                  throw new GeneratorException(
                          "Not implemented appendCollectionTypeField for list with type: " + descriptor.getType() + " in " +
                          this.getClass()
                              .getSimpleName());
          }
      }
docs: Append a specific list type field to the definition.
  
  @param field JField to append.
  <pre>
  {@code
  .addShortArrayField("shortValues")
  }
  </pre>