Package-level declarations
Types
Thrown when there are two or more implicit dependencies that match the given key.
Thrown when resolving a given dependency loops back on itself.
Implementation of DependencyMap for referencing items from the server's file configuration.
Thrown when attempting to instantiate an abstract type using reflection.
Defines a policy for resolving conflicts between two dependency creation functions.
Represents the result of a dependency conflict resolution within a dependency injection system.
Wraps the logic for creating a new instance of a dependency.
Configuration class for dependency injection settings and behavior customization.
Common parent for dependency injection problems.
Unique key for a dependency.
Functional interface for mapping a dependency key to its covariant types.
A map of object instances.
Extension interface for dependency maps.
Represents a provider for managing dependencies in a dependency injection mechanism. This interface allows the registration of dependency initializers and the retrieval or instantiation of declared dependencies based on their unique keys.
Provides reflection to dependency injection so that it may create new instances from class references.
Provides the default reflection behavior for the JVM platform, relying on the standard library calls for inferring which constructors to use, and how to evaluate the parameters as dependency keys.
A central registry for managing and resolving dependencies within a dependency injection context.
Functional interface for generating a fresh DependencyResolver
.
Extends DependencyMap with reflection, allowing for the automatic injection of types.
Context for property delegation with chaining (i.e., dependencies.named("foo")
)
Thrown when a dependency is declared more than once.
Thrown when a static reference cannot be resolved from the configuration file.
Thrown when attempting to resolve a dependency that was not declared.
A mutable extension of DependencyMap that allows for adding and retrieving dependencies.
Automatically failing implementation of DependencyReflection that is used by default when unsupported on the current platform.
Thrown when attempting to provide a dependency AFTER the dependency map is created.
Qualifier for specifying when a dependency key maps to a property in the file configuration.
Properties
The default conflict policy ensures that explicit declarations take precedence over implicit types.
The default covariance logic for dependency keys.
Default reflection provider for the JVM, using standard JVM reflection calls for discovering constructors and parameter details.
Reflection is currently disabled for all non-JVM platforms.
A Ktor application plugin for managing the registration and resolution of module dependencies.
During testing, we ignore conflicts. This allows for replacing base implementations with mock values.
A predefined implementation of DependencyKeyCovariance that creates a covariant dependency key based on the given key. It generates a list containing a single dependency key with a new TypeInfo that retains the same type and Kotlin type as the original key.
A DependencyKeyCovariance that generates supertypes for out type arguments of parameterized types.
Standard covariance mapping for matching dependency keys to supertypes and implemented interfaces.
Matches name-qualified dependency keys to the unnamed forms.
Functions
Creates an instance of the specified type T using the dependency resolver. This function uses the DependencyReflection
mechanism to dynamically construct an instance of the requested type, resolving dependencies as needed.
Creates or retrieves an instance of the specified type T from the DependencyResolver. If the instance does not already exist, it is created using reflection.
DSL helper for declaring dependencies with dependencies {}
block.
Convenience function for DependencyKey(typeInfo<T>(), name, qualifier)
.
Get an item from the dependency map synchronously.
Blocking is unavailable for other platforms, so we instead attempt to get the completed value.
Determines if the type associated with a DependencyKey
is nullable.
Helper operator function for combining covariance logic.
Combines two DependencyMap
s into one.
Registers a dependency provider that takes no parameters and returns a value of type E.
Registers a dependency provider that takes one input parameter and returns a value of type E.
Registers a dependency provider that takes two input parameters and returns a value of type E.
Registers a dependency provider that takes three input parameters and returns a value of type E.
Registers a dependency provider that takes four input parameters and returns a value of type E.
Registers a dependency provider that takes five input parameters and returns a value of type E.
Registers a dependency provider that takes six input parameters and returns a value of type E.
Basic call for providing a dependency, like provide<Service> { ServiceImpl() }
.
Helper operator function for combining covariance logic.