hasAnnotationOf

abstract fun hasAnnotationOf(name: KClass<*>, vararg names: KClass<*>): Boolean

Determines whether the declaration has at least one annotation of the specified KClass type.

Return

true if there is a matching declaration, false otherwise.

Parameters

name

the KClass type of the annotation to check.

names

the KClass types of the annotations to check.


abstract fun hasAnnotationOf(names: Collection<KClass<*>>): Boolean

Determines whether the declaration has at least one annotation of the specified KClass type.

Return

true if there is a matching declaration, false otherwise.

Parameters

names

the KClass types of the annotations to check.