@NotNull
  private static <T extends TargetEvent> T map(@NotNull BuildTarget<?> target,
                                                                              @NotNull Supplier<T> event) {
    T data = event.get();
    data.name = target instanceof ModuleBasedTarget
                ? ((ModuleBasedTarget<?>)target).getModule().getName() :
                target.getId();
    data.type = target.getTargetType().getTypeId();
    data.isFileBased = target.getTargetType().isFileBased();
    data.isTest = target.getTargetType() instanceof JavaModuleBuildTargetType &&
                  ((JavaModuleBuildTargetType)target.getTargetType()).isTests();
    return data;
  }
@NotNull
  private static <T extends TargetEvent> T map(@NotNull BuildTarget<?> target,
                                                                              @NotNull Supplier<T> event)