static void writeConfiguration(final IonWriter writer,
                                 final WriteContext context,
                                 final GradleConfiguration configuration) throws IOException {
    context.configurationsCollector.add(configuration, new ObjectCollector.Processor<IOException>() {
      @Override
      public void process(boolean isAdded, int objectId) throws IOException {
        writer.stepIn(IonType.STRUCT);
        writer.setFieldName(OBJECT_ID_FIELD);
        writer.writeInt(objectId);
        if (isAdded) {
          writeString(writer, "name", configuration.getName());
          writeString(writer, "description", configuration.getDescription());
          writeBoolean(writer, "visible", configuration.isVisible());
          writeBoolean(writer, "scriptClasspathConfiguration", configuration.isScriptClasspathConfiguration());
          writeStrings(writer, "declarationAlternatives", configuration.getDeclarationAlternatives());
        }
        writer.stepOut();
      }
    });
  }
static void writeConfiguration(final IonWriter writer,
                                 final WriteContext context,
                                 final GradleConfiguration configuration)