Retrofit is an open source library by Square that turns annotated java interfaces into REST clients. The library is currently in its second beta and changed quite a bit from its first version to better support the Ok stack. In this post we will go through its code, explaining its main techniques and inner workings. This post assumes some knowledge of the library as a user of it. Continue reading
In this post we will see how to extract the annotation value, (i.e.
@SerializedName("choc")) given an annotated enum constant. This technique is useful when we generate strings for unit tests in the context of Json deserialization. Furthermore, we will discuss some features of enums and annotations, and their connections with the reflection API. Continue reading