You use them when you want to either insert or retrieve something from an object through reflection.
If you are not writing some kind of framework, client, or reusable code, this is usually not what you are going to do.
A concrete example would be an annotation in a Riak Java client .
For ORM (Relational Object Mapping), I created a complete set of annotations that allows the user to annotate their own classes so that they can simply say “Please save this in Riak” and pass in your own object. Annotations allow you to annotate a bucket, key, content type, vector clock, etc., And using reflection, I extract this information and create the corresponding wire protocol object, then send Riak.
Riak; /.
, - ORM , . . , JUnit - , , JSON-, (Gson, Jackson). Spring - .