winter-androidx / io.jentz.winter.androidx / SimpleAndroidInjectionAdapter

SimpleAndroidInjectionAdapter

open class SimpleAndroidInjectionAdapter : InjectionAdapter

Extensible injection adapter that operates on an io.jentz.winter.inject.ApplicationScope component with an ActivityScope subcomponent.

The adapters opens the application component for Application and the "activity" component for Activity. The Activity must implement LifecycleOwner so that the opened activity graph can be automatically closed.

The following is provided via the activity graph:

Constructors

<init>

SimpleAndroidInjectionAdapter(app: WinterApplication)

Extensible injection adapter that operates on an io.jentz.winter.inject.ApplicationScope component with an ActivityScope subcomponent.

Properties

app

val app: WinterApplication

Functions

close

open fun close(instance: Any): Unit

closeActivityGraph

open fun closeActivityGraph(activity: Activity): Unit

closeFragmentGraph

open fun closeFragmentGraph(fragment: Fragment): Unit

get

open fun get(instance: Any): Graph?

getActivityGraph

open fun getActivityGraph(activity: Activity): Graph?

getActivityParentGraph

open fun getActivityParentGraph(activity: Activity): Graph?

getApplicationGraph

open fun getApplicationGraph(application: Application): Graph?

getBroadcastReceiverGraph

open fun getBroadcastReceiverGraph(receiver: BroadcastReceiver): Graph?

getContentProviderGraph

open fun getContentProviderGraph(contentProvider: ContentProvider): Graph?

getContextWrapperGraph

open fun getContextWrapperGraph(contextWrapper: ContextWrapper): Graph?

getFragmentGraph

open fun getFragmentGraph(fragment: Fragment): Graph?

getServiceGraph

open fun getServiceGraph(service: Service): Graph?

getViewGraph

open fun getViewGraph(view: View): Graph?

setupActivityGraph

open fun setupActivityGraph(activity: Activity, builder: Builder): Unit

Inheritors

AndroidPresentationScopeInjectionAdapter

open class AndroidPresentationScopeInjectionAdapter : SimpleAndroidInjectionAdapter

Extended version of SimpleAndroidInjectionAdapter that retains a PresentationScope subgraph during Activity re-creation (configuration changes).