Revealing the magic behind Java annotations
summary
Explains concrete techniques: runtime discovery uses classpath scanning or bytecode readers like ClassGraph, proxies and code gen use ASM/Byte Buddy/ByteBuddy-style APIs or the new Class File API, and compile/build-time uses jandex + Gizmo or Java annotation processors to emit bytecode or sources. Calls out that Lombok mutates the AST and breaks incremental compilation and upgrades, and that Micronaut moves work to compile time so runtime has no reflection, yielding ~200ms JVM startup and ~8ms Graal native, used in production (Disney+) to cut costs.
AI-written summary · about
chapters (12)
- 0:00Introduction and speaker background
- 3:38Why Java annotations matter
- 5:06Runtime annotation processing basics
- 10:00Runtime proxy generation techniques
- 19:38Problems with runtime processing
- 23:38Compile-time annotation processing
- 26:12Pluggable annotation processors
- 30:10Lombok’s technical issues
- 38:50Micronaut’s compile-time approach
- 43:06Timed example with Micronaut
- 46:07Startup time and memory benefits
- 49:19Q&A and closing remarks








