So compile-time annotation processing is as old as the annotations themselves in Java. Yet most of the useful libraries were developed with the runtime approach in mind – at least at first.
Now, however, I notice a recent rise in interest in the compile-time approach. Where until now we only had runtime annotation libraries like Spring, Guice, Dozer we now have compile-time equivalents: immutables, MapStruct, Dagger 2 any many more for some specific use-cases.
One reason may be that Spring and Dozer, e.g., started out with the XML approach, wherein parsing the XML data and then doing something with it is quite similar to reading the annotations metadata and then doing virtually the same.
But are there some other reasons, maybe? Did developers only recently notice the advantages of ensuring the application correctness at compile-time? Or maybe Java 8 made the compile-time annotation processing / code-generation somewhat easier?