WinterApplication
Holds the plugins, the application Component and the application Graph.
Applications usually use the Winter object. To use Winter in a library it is recommended to create a library specific object from WinterApplication, so that the library doesn't share its component, graph and plugins with the application.
Example:
// configure the application component
Winter.component {
singleton<GitHubApi> { GitHubApiImpl() }
singleton { RepoListViewModel(instance()) }
}
// open the application graph
val graph = Winter.openGraph()Classes that can't use constructor injection (e.g. Android activities) can retrieve their dependencies from the application graph with the property delegates of the winter-delegate module.
Inheritors
Constructors
Convenient constructor to configure the application Component during initialization.
Functions
Close the application graph.
Close the application graph if open otherwise do nothing.
Sets the application component by supplying an optional qualifier and a component builder block.
Create graph from component without registering it as application graph.
Get application graph if already open otherwise open and return it.
Open the application component.