António Bastião
12/07/2022, 10:32 PM@Target(AnnotationTarget.CLASS)
annotation class WithProto(val value: Array<KClass<*>>)
@WithProto(value = [UserPreferences::class, Int::class])
I based my example on this https://kotlinlang.org/docs/annotations.html#constructors,
Or would it be possible somehow cast the the kstype to an actual object?Jiaxiang
12/08/2022, 12:09 AMUserPreferences
is generated, which means it is in source rather than in classpath, therefore reflection won’t work.Jiaxiang
12/12/2022, 6:18 PMBuilder
class declared inside UserPreferences
class, you should be able to get UserPreferences
class from parent
of Builder
António Bastião
12/12/2022, 8:12 PMnull
. Have to check what I missed. Thanks a lot