@Override
  @Nullable
  protected BinaryContent instrument(CompileContext context,
                                     CompiledClass compiledClass,
                                     ClassReader reader,
                                     ClassWriter writer,
                                     InstrumentationClassFinder finder) {
    try {
      boolean generateLineNumbers = SystemProperties.getBooleanProperty(GENERATE_LINE_NUMBERS_PROPERTY, false);
      var generators = hasThreadingAssertions(finder) ? TMHAssertionGenerator2.generators()
                                                      : TMHAssertionGenerator1.generators();
      if (TMHInstrumenter.instrument(reader, writer, generators, generateLineNumbers)) {
        return new BinaryContent(writer.toByteArray());
      }
    } catch (Throwable e) {
      LOG.error(e);
      final Collection<File> sourceFiles = compiledClass.getSourceFiles();
      String msg = DevKitJpsBundle.message("tmh.cannot.instrument", StringUtil.join(sourceFiles, File::getName, ", "), e.getMessage());
      String firstFile = ContainerUtil.getFirstItem(compiledClass.getSourceFilesPaths());
      context.processMessage(new CompilerMessage(getPresentableName(), BuildMessage.Kind.ERROR, msg, firstFile));
    }
    return null;
  }
@Override
  @Nullable
  protected BinaryContent instrument(CompileContext context,
                                     CompiledClass compiledClass,
                                     ClassReader reader,
                                     ClassWriter writer,
                                     InstrumentationClassFinder finder)