Join Slack
Powered by
Is there a way to get an instance if you only have...
# kodein
b
bdavisx
05/27/2018, 10:02 PM
Is there a way to get an instance if you only have a Java or Kotlin class but can't supply a reified type?
s
streetsofboston
05/28/2018, 12:46 AM
Yes, you can. Reification is just syntactic sugar, basically a copy&paste done by the compiler. Go to the definition of the
Kodein.instance
function. Then copy and paste its implementation manually into your own code.
4
Views
Open in Slack
Previous
Next