Hi all, As I am finished with the new Buffers, in order to use them I need to update the code-generation to reflect the changes. Currently all code-generators use the same method of using FreeMarker templates to generate the code.
Initially I was planning on simply updating these templates to the new buffer api. For ToddySoft however I built a completely new code-gen that uses JavaPoet. It has the advantage of being a lot more readable code, as there is no mixture of template and logic. With java-poet it’s for example simple to iterate over all fields of a type and in that iteration output the properties, constructor arguments, getters, serializer, parser, getLengthInBits etc. However I regularly got lost in where I need to change something to have code output changed in a desired way. Another disadvantage is, that JavaPoet is only available for Java … so all other languages are left out. Admittedly I would prefer to stick with FreeMarker and possibly cleanup the templated and helpers. What do you folks think? Chris
