AppInitializer


class AppInitializer


An AppInitializer can be used to initialize all discovered ComponentInitializers. The discovery mechanism is via <meta-data> entries in the merged AndroidManifest.xml.

Summary

Public functions

java-static AppInitializer
getInstance(context: Context)
T
<T> initializeComponent(component: Class<Initializer<T!>!>)

Initializes a Initializer class type.

Boolean

Returns true if the Initializer was eagerly initialized..

Public functions

getInstance

Added in 1.0.0
java-static fun getInstance(context: Context): AppInitializer
Parameters
context: Context

The Application Context

Returns
AppInitializer

The instance of AppInitializer after initialization.

initializeComponent

Added in 1.0.0
fun <T> initializeComponent(component: Class<Initializer<T!>!>): T

Initializes a Initializer class type.

Parameters
<T>

The instance type being initialized

component: Class<Initializer<T!>!>

The Class of Initializer to initialize.

Returns
T

The initialized instance

isEagerlyInitialized

Added in 1.0.0
fun isEagerlyInitialized(component: Class<Initializer<Any!>!>): Boolean

Returns true if the Initializer was eagerly initialized..

Parameters
component: Class<Initializer<Any!>!>

The Initializer class to check

Returns
Boolean

true if the Initializer was eagerly initialized.