Below you will find pages that utilize the taxonomy term “Annotations”
Blogs
read more
Annotation Processor Testing
Creating an Annotation Processor means that you will likely also want to add tests, but this can be tricky since the runtime is the compilation process itself, meaning that you will have to invoke a compilation step during test execution. In this post I’d like to outline what you can do to ensure proper test coverage.
Annotation Processing
In Java, Annotations allow compile-time metaprogramming, meaning that it allows creating code based on other source code. I use this in Java - Lenses to create auxiliary classes for annotated records. These contain various instances and functions which need the type information of the annotated records, meaning that there is no way to this directly in the source code itself.