gh-pages / com.nextfaze.devfun.inject.dagger2
Package com.nextfaze.devfun.inject.dagger2
Provides default heavy-reflection based Dagger 2 injector and convenience functions for reflectively
locating object instances from Dagger 2.x @Component
objects.
Types
Name | Summary |
---|---|
Dagger2InstanceProvider | abstract class Dagger2InstanceProvider : InstanceProvider |
InjectFromDagger2 | class InjectFromDagger2 : AbstractDevFunModule This module adds rudimentary support for searching Dagger 2.x component graphs for object instances. |
Properties
Name | Summary |
---|---|
useAutomaticDagger2Injector | var useAutomaticDagger2Injector: Boolean Flag to indicate if the default heavy-reflection based Dagger 2 injector should be used. |
Functions
Name | Summary |
---|---|
tryGetInstanceFromComponent | fun <T : Any > tryGetInstanceFromComponent(component: Any , clazz: KClass < T >, cacheResolvedTypes: Boolean = true): T ? Helper function to be used on Dagger 2.x Component implementations. |
tryGetInstanceFromComponentCache | fun <T : Any > tryGetInstanceFromComponentCache(component: Any , clazz: KClass < T >): T ? Helper function to be used on Dagger 2.x Component implementations. |
tryGetInstanceFromComponentReflection | fun <T : Any > tryGetInstanceFromComponentReflection(component: Any , clazz: KClass < T >): T ? Helper function to be used on Dagger 2.x Component implementations. |