Are they only used to get the name of the method whcih subsequently is fed
to the url of the http request???
jclouds uses these methods to automatically generate HTTP invocations.
The class that achieves most of this is the RestAnnotationProcessor. [1]
Another question is why dynamic invocation is used? Is it used to enable
runtime deployment of new providers?
One of the reasons is similar to why deserializers such as Gson, or
ORM tools such as Hibernate, also use dynamic processing of
annotations: it means that the writer of a jclouds provider does not
need to care about the underlying mechanics of HTTP call invocation,
but can focus on simply defining the API endpoints that need to be
called.
If you have any questions about the design, feel free to jump on IRC
(#jclouds at Freenode)!
ap
[1]
https://github.com/jclouds/jclouds/blob/master/core/src/main/java/org/jclouds/rest/internal/RestAnnotationProcessor.java