https://kotlinlang.org logo
#reflect
Title
# reflect
v

v79

11/23/2023, 8:43 PM
To get a list of all the constructor properties of a Class, I either need reflection (with kotlin-reflect), or do it at compile time with Kapt or KSP. Is that right? I have a KType and I'd like to know its constructor properties - at runtime I've got
(kType.classifier as KClass<*>).constructors
and that requires kotlin-reflect. Any alternatives?
1
4 Views