hasAnnotation

inline fun <T : Annotation> KAnnotatedElement.hasAnnotation(): Boolean

Returns true if this element is annotated with an annotation of type T.

Since Kotlin

1.4