https://kotlinlang.org logo
#announcements
Title
# announcements
j

jcomo

10/13/2017, 5:25 PM
Is there a way to specify that a parameter of an annotation must extend a class? Can’t figure out the syntax in Kotlin without also requiring the type parameter be specified on the annotation itself.
Copy code
@Target(AnnotationTarget.VALUE_PARAMETER)
@Retention(AnnotationRetention.RUNTIME)
annotation class SqlEmbedded(val using: KClass<*>)
I want the
using
parameter to be a class definition that extends
ResultSetMapper<*>
.