Is it possible to obtain parameter init value in k...
# kapt
p
Is it possible to obtain parameter init value in kapt? For example for
class User(var age: Int = 18)
get
18
value.
g
You can get it from Metadata annotation. There is a new Kotlin metadata manipulation library from Kotlin Team https://youtrack.jetbrains.com/issue/KT-23198 And one from @Eugenio : https://github.com/Takhion/kotlin-metadata
e
@pavel.shackih @gildor actually no, you can't get that! You can only know if a parameter has a default value, but the value is "compiled code", just like the body of a function :(
g
Oh yeah, I forgot about it, this case is just simple one