private void generateForwardingClass(
      String forwardingClassName,
      Executable executable,
      TypeMirror builtType,
      TypeElement autoBuilderType) {
    // The synthetic constructor has the same parameters as the user-written constructor, plus as
    // many `int` bitmasks as are needed to have one bit for each of those parameters, plus a dummy
    // parameter of type kotlin.jvm.internal.DefaultConstructorMarker to avoid confusion with a
    // constructor that might have its own `int` parameters where the bitmasks are.
    // This ABI is not publicly specified (as far as we know) but JetBrains has confirmed orally
    // that it unlikely to change, and if it does it will be in a backward-compatible way.
    ImmutableList.Builder<TypeMirror> constructorParameters = ImmutableList.builder();
    executable.parameters().stream()
        .map(Element::asType)
        .map(typeUtils()::erasure)
        .forEach(constructorParameters::add);
    int bitmaskCount = IntMath.divide(executable.parameters().size(), 32, CEILING);
    constructorParameters.addAll(
        Collections.nCopies(bitmaskCount, typeUtils().getPrimitiveType(TypeKind.INT)));
    String marker = "kot".concat("lin.jvm.internal.DefaultConstructorMarker"); // defeat shading
    constructorParameters.add(elementUtils().getTypeElement(marker).asType());
    byte[] classBytes =
        ForwardingClassGenerator.makeConstructorForwarder(
            forwardingClassName, builtType, constructorParameters.build());
    try {
      JavaFileObject trampoline =
          processingEnv.getFiler().createClassFile(forwardingClassName, autoBuilderType);
      try (OutputStream out = trampoline.openOutputStream()) {
        out.write(classBytes);
      }
    } catch (IOException e) {
      throw new UncheckedIOException(e);
    }
  }
Generates a class that will call the synthetic Kotlin constructor that is used to specify which
optional parameters are defaulted. Because it is synthetic, it can't be called from Java source
code. Instead, Java source code calls the {@code of} method in the class we generate here.
value/src/main/java/com/google/auto/value/processor/AutoBuilderProcessor.java