@string in constructor -?

pg. 38

data class Question(@StringRes val textRedId: Int, val answer: Boolean)

what rule would allow one to conclude that adding the @StringRes in front of the variable would work in a constructor.

Thanks in advance.