A deep dive into build-time annotation processing
summary
Explains that build-time annotation processors generate new Java classes (no runtime reflection), use the compiler’s Filer/Element/TypeMirror APIs and run in processing rounds, improving performance by precreating parsers and builders. Notes limits: cannot modify existing classes, processor order is not guaranteed, and processors must be registered in META-INF/services and compiled before use. Recommends code-generation libs (Helidon Class Model, JavaPoet, Lombok) to handle formatting and imports; Helidon’s builder generator is used successfully in production.
AI-written summary · about
