code: void compileToJar(ByteSink jarTarget, Optional<ByteSink> srcJarTarget) throws IOException {
      resetErrorReporter();
      disallowExternalCalls();
      ServerCompilationPrimitives primitives = compileForServerRendering();
      BytecodeCompiler.compileToJar(
          primitives.registry, primitives.soyTree, errorReporter, typeRegistry, jarTarget);
      if (srcJarTarget.isPresent()) {
        BytecodeCompiler.writeSrcJar(primitives.soyTree, soyFileSuppliers, srcJarTarget.get());
      }
      throwIfErrorsPresent();
      reportWarnings();
    }
docs: Compiles this Soy file set into a set of java classes implementing the {@link CompiledTemplate}
  interface and writes them out to the given ByteSink as a JAR file.
  
  @throws SoyCompilationException If compilation fails.