setProvider

open fun setProvider(forClass: Class<*>, provider: () -> Any)

Adds the selected provider to the Context. This method is internally used by inlined binding methods.

Parameters

forClass

type of objects provided by the registered provider.

provider

will be bind to the selected class.

See also

Throws

if provider is already defined.