jdorleans
09/15/2017, 4:50 PMerased 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?jdorleans
09/15/2017, 5:25 PMBind I can do: Bind(erased<MyClass<*>>()) which will generate the bind like: bind<MyClass> instead of bind<MyClass<*>>.
Yet, I’m not sure whether it’s a bug or not.jdorleans
09/15/2017, 5:25 PMsalomonbrys
09/20/2017, 4:18 PMjdorleans
09/20/2017, 4:25 PMjdorleans
09/20/2017, 4:25 PM