Code Generation in Kotlin with Annotation and KotlinPoet

Code Generation in Kotlin with Annotation and KotlinPoet

In this session, I talked about how we can implement an annotation processor into our Kotlin project together with KotlinPoet to generate Kotlin source files. I then presented some strategies to test and validate the generated code. Discussed the benefits and limitations of this approach and when the appropriate time to use it is. Finally, I provided some sample implementation of annotation processing which we can use to increase our productivity.


Malvin Sutanto

August 24, 2019