https://kotlinlang.org logo
Title
u

user

07/19/2022, 2:41 PM
KSP: how can I get the default value of a data class property? I have the following data class annotated with @MyAnnotation: @MyAnnotation data class MyDataClass( val foo: Boolean = true, val bar: Int = 123, val buz: String? = "abc", ) From the ClassDeclaration I can get all the KSPropertyDeclaration, and I'm able to get the simpleName and resolve the KSType, but I don't know how to get the default values of each property.