... some annoying boilerplate conversions to be hand-written. This is an attempt to bypass the problem by generating Scala code directly. It also uses Scala syntax so the generated code is much more compact. There is a fairly comprehensive set of unit tests, which actually generate code, compile it, and execute it to verify expectations.