private static void writeConfig(final IonWriter writer,
                                  final WriteContext context,
                                  final AnnotationProcessingConfig config) throws IOException {
    context.configCollector.add(config, 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) {
          writeStrings(writer, "args", config.getAnnotationProcessorArguments());
          writeStrings(writer, "paths", config.getAnnotationProcessorPath());
          writeString(writer, "output", config.getProcessorOutput());
          writeBoolean(writer, "isTestSources", config.isTestSources());
        }
        writer.stepOut();
      }
    });
  }
private static void writeConfig(final IonWriter writer,
                                  final WriteContext context,
                                  final AnnotationProcessingConfig config)