Lisp!
In particular lisp macros are the generic code generation tool that you can use all the time to improve your productivity.
Notice also, that you have lisp available in emacs, and that you can also use it in emacs to generate any source code. The only downside of emacs source code generation is that in general, you don't or are not allowed to keep the original emacs lisp source code (or to keep it in git), so that the level of abstraction allowed by code generation is lost. Too bad for the cow-orkers and maintainers, but at least you could generate all that code quickly and flawelessly.