W3cubDocs

/Kotlin

hasAnnotation

Platform and version requirements: JVM (1.4)
fun <reified T : Annotation> KAnnotatedElement.hasAnnotation(): Boolean

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

© 2010–2020 JetBrains s.r.o. and Kotlin Programming Language contributors
Licensed under the Apache License, Version 2.0.
https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.reflect.full/has-annotation.html