BootstrapContext

A simple bootstrap context that is available during startup and Environment post-processing up to the point that the ApplicationContext is prepared.

Provides lazy access to singletons that may be expensive to create, or need to be shared before the ApplicationContext is available.

Author

Phillip Webb

Since

2.4.0

Inheritors

Functions

Link copied to clipboard
abstract fun <T> get(type: Class<T>): T
Return an instance from the context if the type has been registered.
Link copied to clipboard
abstract fun <T> getOrElse(type: Class<T>, other: T): T
Return an instance from the context if the type has been registered.
Link copied to clipboard
abstract fun <T> getOrElseSupply(type: Class<T>, other: Supplier<T>): T
Return an instance from the context if the type has been registered.
Link copied to clipboard
abstract fun <T, X : Throwable?> getOrElseThrow(type: Class<T>, exceptionSupplier: Supplier<out X>): T
Return an instance from the context if the type has been registered.
Link copied to clipboard
abstract fun <T> isRegistered(type: Class<T>): Boolean
Return if a registration exists for the given type.