Hello everyone, is it possible to retrieve the def...
# ksp
d
Hello everyone, is it possible to retrieve the default value (initializer) from a KSPropertyDeclaration? If so, how?
j
KSProperty does not have an API for getting value, so it is not possible.
d
That's what I thought, bummer.
I guess, even with the
KSClassDecleration
it would still be impossible to retrieve the value, is that correct?
j
yes, but how should class have a value to begin with?
currently the only way to get a compile time constant value is via
KSValueArgument
👍 1
d
Using KSValueArgument and with that Annotations could actually be a good workaround for the time beeing. I guess I will create a new Annotation named @Default with one argument and use that value. Thank you very much for your help
j
Yes this would fit into KSP use case. 🙂