kailan
05/31/2017, 7:42 PMpasssy
06/02/2017, 11:46 AMpasssy
06/02/2017, 11:47 AM-keepattributes Signature
is required. It works great without this rule and I can’t find where kodein is using a Signature classsalomonbrys
06/02/2017, 5:51 PMpasssy
06/06/2017, 9:06 PMerased
is not the default. Generic types seem to be an edge case. I checked a few large (internal) projects and couldn’t find a single generic type when using Dagger2.passsy
06/06/2017, 9:10 PMerased
module in 4.0
and promote it to default for performance reasonspasssy
06/06/2017, 9:13 PMkodein.instance()
should by default map to kodein.Instance(erased())
and a new kodein.genericInstance()
could inject generic typessalomonbrys
06/07/2017, 3:35 PMbind<List<Person>> with singelton { getContactList() }
will risked being fooled. When using erased, one should always use only the star syntax : ``bind<List<*>> with ...`, but there are no ways to enforce this !salomonbrys
06/07/2017, 3:40 PMsalomonbrys
06/07/2017, 4:08 PMapatrida
06/07/2017, 4:14 PMsalomonbrys
06/07/2017, 4:15 PMapatrida
06/07/2017, 4:16 PMsalomonbrys
06/07/2017, 4:16 PMerased<T>()
function (which is a simple alias to T::class.java
) is a lot faster than generic<T>()
which extracts all generic informations.apatrida
06/07/2017, 4:17 PMapatrida
06/07/2017, 4:17 PMsalomonbrys
06/07/2017, 4:17 PMapatrida
06/07/2017, 4:19 PMsalomonbrys
06/07/2017, 4:20 PMParameterizedType
.apatrida
06/07/2017, 4:20 PMgenericToken<T>()
callsalomonbrys
06/07/2017, 4:21 PMapatrida
06/07/2017, 4:21 PMsalomonbrys
06/07/2017, 4:22 PMapatrida
06/07/2017, 4:23 PMsalomonbrys
06/07/2017, 4:24 PMapatrida
06/07/2017, 4:25 PMgenericSuperclass
and then get the type from there, which you then later return as some wrapped type. anyway to just cache the wrapped type and check for the original class before you do the reflection process. or maybe it has to happen in your inline function instead (it is creating a new class each call?)apatrida
06/07/2017, 4:26 PMapatrida
06/07/2017, 4:26 PMapatrida
06/07/2017, 4:26 PMsalomonbrys
06/07/2017, 4:27 PM