kotest-mpp / io.kotest.mpp / kotlin.reflect.KClass / annotation

annotation

fun <reified T> KClass<*>.annotation(): T?

Finds the first annotation of type T on this class, or returns null if annotations are not supported on this platform or the annotation is missing.