Behind the Annotations
summary
Shows how annotations are implemented and used to do real work not just document code including a compile time annotation processor that rejects non final mutable classes by inspecting elements and modifiers and a runtime TestExecutionListener that uses reflection to create random entities, save them to a Spring repository, and clean up after tests. Covers retention policies, repeatable and composite annotations, using Javax Filer to generate files, and Google auto-service to register processors. Demonstrations compile and the tests run but author warns against overuse.
AI-written summary · about
chapters (9)
- 0:00Introduction and speaker background
- 4:13What are Java annotations
- 10:51Demo of simple annotations
- 16:41How annotations work under the hood
- 21:04Compile-time annotation processing
- 25:40Generating code with annotations
- 28:13Runtime annotations in testing
- 32:00When to use annotations
- 33:47Closing remarks and Q&A
