mercredi 18 août 2021

Given a class, find out if it has been annotated with any annotation, yes or no

My tutor has given me this task to write a Boolean method that checks whether a class has been annotated at all. Don't want to bother you guys with further details, but it was actually a package, so at first I used the Google reflections library to collect all classes from my project. Unfortunately, this library, along with others doesn't answer my question, they all require me to provide annotation class, which I yet to find out with my method I am struggling with.

Edit: this is a Spring project





Aucun commentaire:

Enregistrer un commentaire