Generating Kotlin Code
summary
Kotlin generation moves many runtime checks into compile time (nullability, readonly lists, constructor-enforced fields) and often replaces Java builders; the team builds and ships KotlinPoet to model types, properties and code blocks and it reliably emits idiomatic Kotlin while handling imports and refactoring. For Java interop they perform ASM bytecode edits to fix metadata when needed, and they document pitfalls like reified types caveat and multiplatform stdlib annotation gaps.
AI-written summary · about
chapters (7)
- 0:00Introduction to Kotlin code generation
- 3:30Protocol buffers example
- 13:51Kotlin Poet library overview
- 23:36Java interoperability tips
- 24:41Bytecode generation with ASM
- 30:18Multiplatform code generation
- 35:15Key takeaways and Kotlin Poet








