Zoltan Demant
08/24/2022, 3:50 AMClass<T>.newInstance()
to invoke a no-args constructor of T. Is it possible to do something similar for an object in kotlin while only having access to Class<T>
where I know that T is an object, without using reflection?Zoltan Demant
08/24/2022, 3:54 AMT::class.objectInstance
seems to do what I want, but with the help of reflection.ephemient
08/24/2022, 4:08 AMClass<?>
aside from reflection. or are you not counting Java reflection?Zoltan Demant
08/24/2022, 4:20 AMspand
08/25/2022, 7:23 PM() -> T
(the constructor) and derive Class<T>
from thatZoltan Demant
08/26/2022, 2:17 AM