W3cubDocs

/Kotlin

hasAnnotation

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

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

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