Hi folks, is it possible to instance objects using reflection at the common level?
g
Giancarlo Buenaflor
11/30/2023, 5:47 PM
afaik kotlin/native doesn't support creating instance of object with reflection (or ever will?) so probably not
Giancarlo Buenaflor
11/30/2023, 5:47 PM
stuck with kotlin jvm I guess
p
Pavel Lahoda
11/30/2023, 8:54 PM
Not possible through reflection, but you can use KSP for that (generate dynamic adapters in KSP and then instantiate your stuff via them). I am doing exactly that in my ObjectForms library, check this talk for more details: