gh-pages / com.nextfaze.devfun.core / DevFun

DevFun

class DevFun (source)

Primary entry point and initializer of DevFun and associated libraries.

Modules can be added post- initialization by way of devFun += SomeModule() (plusAssign), after which tryInitModules should be called.

To manually initialize, create instance and call initialize. A static reference will be set to this automatically, and can be retrieved using devFun.

e.g. DevFun().initialize(applicationContext)

Constructors

Name Summary
<init> DevFun()
Primary entry point and initializer of DevFun and associated libraries.

Properties

Name Summary
categories val categories: List<CategoryItem>
Processed list of DevFunGenerated definitions - transformed, filtered, sorted, etc.
context val context: Application
Context used to initialize DevFun.
definitions val definitions: List<DevFunGenerated>
List of raw DevFunGenerated definitions.
instanceProviders val instanceProviders: CompositeInstanceProvider
Composite list of all InstanceProviders.
isInitialized var isInitialized: Boolean
Flag indicating if this instance of DevFun has been initialized.
parameterViewFactories val parameterViewFactories: CompositeParameterViewFactoryProvider
Composite list of all ParameterViewFactoryProviders.
viewFactories val viewFactories: CompositeViewFactoryProvider
Composite list of all ViewFactoryProviders.

Functions

Name Summary
developerReferences fun <T : Annotation> developerReferences(): List<ReferenceDefinition>
Get references to annotations that were annotated as DeveloperReference.
dispose fun dispose(): Unit
Disposes initialized modules and clears self (static), context, and module references.
get fun <T : Any> get(): T
Get an instance of a class using instanceProviders.
getDeveloperReferences fun getDeveloperReferences(clazz: KClass<out Annotation>): List<ReferenceDefinition>
Get references to annotations that were annotated as DeveloperReference.
initialize fun initialize(context: Context, vararg modules: DevFunModule, useServiceLoader: Boolean = true): Unit
Initialize the static devFun reference to this, context to Context.getApplicationContext, build instanceProviders, call module’s DevFunModule.initialize, and calls any initializationCallbacks.
instanceOf fun <T : Any> instanceOf(clazz: KClass<out T>): T
Get an instance of a class using instanceProviders.
minusAssign operator fun minusAssign(onInitialized: OnInitialized): Unit
Remove an initialization callback.
plusAssign operator fun plusAssign(module: DevFunModule): Unit
Add a module.operator fun plusAssign(onInitialized: OnInitialized): Unit
Add an initialization callback.
tryInitModules fun tryInitModules(): Unit
Attempts to initialize uninitialized modules.

Extension Properties

Name Summary
devHttpD val DevFun.devHttpD: DevHttpD
devMenu val DevFun.devMenu: DevMenu
httpFrontEnd val DevFun.httpFrontEnd: HttpFrontEnd
stetho val DevFun.stetho: DevStetho