Package-level declarations

Types

Link copied to clipboard

An automatically registered module during app start up that provides access to the spezi application instance.

Link copied to clipboard
sealed interface Configuration

A configuration for the Spezi framework, which allows you to define and register modules and their dependencies.

Link copied to clipboard

Builder for creating a Configuration for a SpeziApplication.

Link copied to clipboard
interface DefaultInitializer<out M : Module>

An interface for providing a default module instance to be used in the module dependency graph in case no explicit instance is registered in the configuration block of the SpeziApplication. In case the module is not registered, Spezi will try to create the instance by checking whether the companion object of the Module type implements this interface.

Link copied to clipboard

A graph of dependencies built at app start up via the configuration of the SpeziApplication.

Link copied to clipboard
interface Module

Base interface that all Spezi modules must implement in order to get provided in the SpeziApplication modules dependency graph.

Link copied to clipboard

Base interface that all Spezi applications must implement to provide the Spezi modules dependency graph

Link copied to clipboard
class SpeziError(message: String, cause: Throwable?) : Throwable

A custom exception class used in the Spezi framework.

Properties

Link copied to clipboard

Returns the application Context of the SpeziApplication if Application conforms to SpeziApplication or null otherwise.

Functions

Link copied to clipboard
inline fun <M : Module> dependency(identifier: String? = null): Lazy<M>

Lazy delegate to retrieve a required module dependency from the SpeziApplication dependency graph.

Link copied to clipboard
inline fun <M : Module> optionalDependency(identifier: String? = null): Lazy<M?>

Lazy delegate to retrieve an optional module dependency from the SpeziApplication dependency graph.

Link copied to clipboard

Combines two Configuration instances into a new one, merging their modules and factories.

Link copied to clipboard
Link copied to clipboard
fun speziError(message: String, cause: Throwable? = null): Nothing

A custom error function that throws a SpeziError with the provided message and optional cause.