Avalon A Programmer Blog

Access annotation fields by reflection in Kotlin

This only works on Kotlin 1.1.4 or above. There is a bug exist before that.

Annotations and reflection always come in handy when you try to avoid boilerplate. Today I am going to get all the fields marked by a custom annotation, and put its value into a map.

Create executable artifact from Kotlin project

As Kotlin is a much better language to write than Java (it also compatible with Java), I try to write a library in Kotlin and compile as a artifact(.jar). My project is a Gradle project and use Intellij IDEA as IDE. However, it is difficult to find a tutorial that works.

Comparing new languages that I learnt

The first half of 2017 has past. I learnt several new languages: Python, Swift and Kotlin. Despite I only experience them for a short period of time, I am going to talk about them and compare to the languages that I familiar with (i.e. C#, Java).