TangleInjector

interface TangleInjector<T>

This is an internal Tangle API and may be changed at any time.

This interface is just a facade around Dagger's dagger.MembersInjector.

It's necessary because we multi-bind the injectors into a Map, and need to provide a default empty map in case there are no real injectors:

@Multibinds
public fun bindTangleInjectorMap(): Map<Class<*>, @JvmSuppressWildcards TangleInjector<*>>

If this was a Map<>, MembersInjector<>>, Dagger would throw an exception because it sees MemberInjector as an intrinsic like Lazy or Provider, and wants us to bind the type parameter instead.

Since

0.13.0

Functions

Link copied to clipboard
abstract fun inject(target: T)

Injects all dependencies into target.

Sources

Link copied to clipboard