I develop Android applications and often use annotations as compile time parameter checks, mostly android\'s support annotations.
Example in java code:
There's currently no way to achieve exactly this in Kotlin, since an annotation class cannot have a body and thus you cannot declare a constant in it which would be processed by IntDef. I've created an issue in the tracker: https://youtrack.jetbrains.com/issue/KT-11392
For your problem though, I recommend you use a simple enum.