JetValueParameter


#1

I had built some reflection code that used the JetValueParameter annotation. This was useful for getting the names of constructor parameters and types (including generic information), which are not available with Java reflection APIs.

Is there a replacement for this? I understand that I was using an internal structure, so I understand it not being supported; just wondering if there is a suitable replacement that is now available.


#2

We will replace this annotation with more decent Kotlin reflection API soon. The annotation itself will be removed.


#3

Thanks for the info. Currently, however, in my existing code, I get the attached error. It looks like it is related to the usage of JetValueParameter. Should this be usable right now? Or is this because I'm using the deprecated annotation?



error.txt.zip (4.9 KB)

#4

It's obviously a bug. Actually, it is pretty old: KT-3309. As a workaround, try to rewrite your code so there won't be try-catch inside "map".