dimanche 20 septembre 2015

Why do getAnnotations() and getDeclaredAnnotations() methods for Field and Method return the same thing i.e inherited and declared annotations?

I understand the above methods when it comes to Class objects. But there seems to be no difference when it comes to Fields and Methods. What purpose do the two methods serve? Can someone elaborate?

P.S - I know this question is a duplicate of Difference between Field#getAnnotations() and Field#getDeclaredAnnotations() but none of the answers clarify my doubts.





Aucun commentaire:

Enregistrer un commentaire