+ 2
Java custom annotation
How can i find out which class processes a custom annotation? Ie, where is the code that understands what to do when an annotation exists?
11 Answers
+ 1
Sandra Meyer i meant dev defined annotations.
+ 1
Sandra Meyeri looked some docs, understand how to create the annotations all right, just miss where the processing class is referenced.
Btw i fail to see how the reference you are mentioning is answering the question, can you quote the relevant bit?
+ 1
"Or try to look it up" ... lol.
+ 1
Michal this is a springboot app.
+ 1
ifl I don't really know what do you want to achieve, but you can use AOP, create an Aspect and add advice which will be trigger for every method / class you just annotated.
+ 1
Michal thanks, thats the beginning of an answer.... the initial question was more about how to find out which class is the processor of the annotation (if written by someone else)
0
What sort of custom annotation do you mean? Really user (dev) defined annotations or only the "normal", modeled annotations or Json fields?
0
So, you want to create a new dev framework? For real?
0
Btw. take a look into java.lang.annotation
0
Are you using spring or something?
0
Well that depends on the sort of annotations you want to create... There are many kinds of annotations, and you need to describe what you want to create. Or you try to look it up, in the basic annotations codes.