getAnnotations

abstract fun <A : Annotation> getAnnotations(element: KAnnotatedElement, annotationType: KClass<A>, excludes: Set<String>): List<A>(source)

Get annotation instance list from KAnnotatedElement.

Return

The annotation instance, or empty.

Parameters

element

annotation element instance. e.g. from Function or KClass.

annotationType

annotation type.

excludes

excludes annotation class name. will not be checked.


open fun <A : Annotation> getAnnotations(element: KAnnotatedElement, annotationType: KClass<A>): List<A>(source)

Get a repeatable annotation instance from KAnnotatedElement. e.g. from Function or KClass.

Return

The annotation instance, or empty.

Parameters

element

annotation element instance.

annotationType

annotation type.