Join Slack
Powered by
Is there a way to get the default value of a KProp...
# reflect
p
pabl0rg
02/20/2017, 10:35 AM
Is there a way to get the default value of a KProperty?
u
udalov
02/20/2017, 12:53 PM
pabl0rg: what do you mean by the default value? Can you show an example?
p
pabl0rg
02/20/2017, 3:16 PM
for example: i'd like to know that theProp is null by default in
Copy code
var theProp: String = null
u
udalov
02/21/2017, 11:10 AM
There’s no way to know the previous value of a property, JVM does not support that
p
pabl0rg
02/21/2017, 12:56 PM
I guess I'll just check the current value and that will be the default.
pabl0rg
02/21/2017, 12:56 PM
Thanks
2
Views
Open in Slack
Previous
Next