open class Configuration : RuntimeCheckConfiguration, MultipleRootScopeCheckConfiguration
Strategy pattern that allows to change various behaviors of Toothpick. The default configuration is #forProduction(). A custom configuration can be created and used by toothpick, it is even possible to use a composition of the built-in configurations.
Configuration()
Strategy pattern that allows to change various behaviors of Toothpick. The default configuration is |
open fun allowMultipleRootScopes(): Configuration
Allows multiple root scopes in the scope forest. |
|
open fun checkCyclesEnd(clazz: Class<Any>, name: String): Unit |
|
open fun checkCyclesStart(clazz: Class<Any>, name: String): Unit |
|
open fun checkIllegalBinding(binding: Binding<Any>, scope: Scope): Unit |
|
open fun checkMultipleRootScopes(scope: Scope): Unit |
|
open static fun forDevelopment(): Configuration
Performs many runtime checks. This configuration reduces performance. It should be used only during development. The checks performed are:
|
|
open static fun forProduction(): Configuration
Performs no runtime checks. This configuration is faster than |
|
open fun onScopeForestReset(): Unit |
|
open fun preventMultipleRootScopes(): Configuration
Prevents the creation of multiple root scopes in the scope forest. TP scope forest will be restricted to a scope tree. On android this option can help to detect when a scope is reopened after it was destroyed. |