@Eliminate("Boilerplate")
summary
Shows how compile‑time annotation processing actually generates working builder classes via JavaPoet code generation and the javax.annotation processing API, producing private fields, fluent setters and a build() method that compiles into the project. Explains retention SOURCE, filer/messenger use, the annotation processing rounds lifecycle, and how to ship the processor on an apt/gradle configuration so the processor (and its Guava/etc. libs) stay off the APK — i.e. no runtime dependency added.
AI-written summary · about
chapters (17)
- 0:00Introduction and welcome
- 1:19Java boilerplate problem
- 2:22Annotation processing overview
- 5:17Advantages of generated code
- 5:37Components of annotation processing
- 7:04Creating custom annotations
- 10:37Building the annotation processor
- 15:18Service loader discovery
- 17:06Annotation processor configuration
- 18:51Code generation with Java Poet
- 21:18Java Poet basics
- 23:15Generating fields and methods
- 26:56Assembling the builder class
- 28:19Processor implementation steps
- 33:35Finalizing and using the builder
- 35:45Practical usage and gotchas
- 36:49Tools and resources
related talks
56mThe Wonders of Java Annotation Processing at Compile Time
50mRevealing the magic behind Java annotations
46mJava annotation processing magic for muggles
30mYour own @Annotation processor
55mMaking Java More Dynamic
45mMaking Java more dynamic
55mOn Annotations — Time to Stop the Demons
01h 03mJava Annotation Processing
