Would it be possible to make an annotation that implemented this in Kotlin?