findAnnotations

Returns all annotations of the given type on this element, including individually applied annotations as well as repeated annotations.

In case the annotation is repeated, instances are extracted from the container annotation class similarly to how it happens in Java reflection (java.lang.reflect.AnnotatedElement.getAnnotationsByType). This is supported both for Kotlin-repeatable (kotlin.annotation.Repeatable) and Java-repeatable (java.lang.annotation.Repeatable) annotation classes.

Since Kotlin

1.7