Hi, if you have several classes that implement an ...
# popkorn
a
Hi, if you have several classes that implement an interface, which one is instantiated with inject<MyInterface>? And how can I instantiate a particular one?
What I’m also trying to achieve is reading these classes from a properties file. This is for a multiplatform project. I realize there’s no *KClass.fo*rName in Kotlin.
p
Sorry to be so late. If there are several classes implementing an interface, it will give you a compilation error unless you mark one or both implementations with an @ForEnvironment("someName") Then you could inject it by inject<MyInterface>("someName")