motif
motif copied to clipboard
Use annotation processing for code generation
The code-generation branch is already beginning to add the ability to generate all of the case permutations for a given type (e.g. Tuple2
or List
) so that they don't have to be handwritten. Currently this requires generating the code and then copying it into a class file.
It would be nice if there was an annotation that could be added to generator classes such that the Cases
code gets generated automagically as part of the compile.
You may be interested in https://github.com/derive4j/derive4j that does exactly that.