getAnnotation
abstract fun <A : Annotation> getAnnotation(fromElement: KAnnotatedElement, annotationType: KClass<A>, excludes: Set<String>): A?(source)
Get annotation instance from KAnnotatedElement. e.g. from Function or KClass.
Return
The annotation instance, or null.
Parameters
fromElement
annotation fromElement instance.
annotationType
annotation type.
excludes
excludes annotation class name. They will not be parsing.
open fun <A : Annotation> getAnnotation(fromElement: KAnnotatedElement, annotationType: KClass<A>): A?(source)
Get annotation instance fromElement KAnnotatedElement. e.g. fromElement Function or KClass.