Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Java - Annotation processor - method process not called

I am trying to implement AnnotationProcessor. I am following this tutorial.

I am able to debug the annotation processor, and the debugger goes to methods: init, getSupportedAnnotationTypes, getSupportedOptions ,getSupportedSourceVersion but it does not go to process method.

I was unable to find something useful on the internet. Could you please tell me why is this happening and how to fix it?

Thank you.

like image 643
miskohut Avatar asked Jun 18 '26 08:06

miskohut


1 Answers

I just found out that in order to run the process method. At least one element must be annotated with an annotation that was set in getSupportedAnnotationTypes.

like image 79
miskohut Avatar answered Jun 20 '26 22:06

miskohut



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!