Checkout my article "Processing Java Annotations at compilation time"
https://medium.com/javarevisited/reading-annotations-at-compile-time-using-java-annotation-processors-f5a7604bb2f7