T
- the concrete type to be injectedpublic abstract static class AndroidInjector.Builder<T> extends java.lang.Object implements AndroidInjector.Factory<T>
Subcomponent.Builder
pattern implement AndroidInjector.Factory
.Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
abstract AndroidInjector<T> |
build()
Returns a newly-constructed
AndroidInjector . |
AndroidInjector<T> |
create(T instance)
Creates an
AndroidInjector for instance . |
abstract void |
seedInstance(T instance)
Provides
instance to be used in the binding graph of the built AndroidInjector . |
public final AndroidInjector<T> create(T instance)
AndroidInjector.Factory
AndroidInjector
for instance
. This should be the same instance
that will be passed to AndroidInjector.inject(Object)
.create
in interface AndroidInjector.Factory<T>
@BindsInstance public abstract void seedInstance(T instance)
instance
to be used in the binding graph of the built AndroidInjector
. By default, this is used as a BindsInstance
method, but it may be
overridden to provide any modules which need a reference to the activity.
This should be the same instance that will be passed to AndroidInjector.inject(Object)
.
public abstract AndroidInjector<T> build()
AndroidInjector
.