I’m trying to use
erased
similar to what’s suggested in the docs:
erased<Set<String>> will yield a TypeToken representing Set<*>.
In my case, I’m trying to do like:
bind<MyClass<*>>() with multiton { p: Obj<T> -> MyClass<T>(p) }
and
kodein.with(p).Instance(erased<MyClass<T>>())
Basically, what I’m trying to do is to create a bind for MyClass regardless the generics T it must receive. So, I’m binding it with
bind<MyClass<*>>
. However, it seems that
erased<MyClass<T>>
generated `MyClass`instead of
MyClass<*>
as mentioned on the docs for the case with
Set
.
Is there anything I can do to make this right?