Adding annotations using the Java Annotation Processor

I know that annotation handler is usually used to use annotations and respond to them. However, I have a precedent when this “reaction” involves the addition of other annotations. Can this be done in the processor itself? If so, how?

+3
source share
1 answer

The short answer is yes , and you have nothing specific.

An annotation handler is used to create new source files, not to modify existing ones. So when you say “add other annotations”, I think you mean “creating new classes containing annotations”.

. process .

,

  • ,
  • , ,

, : , ;-).

+1

All Articles