Package-level declarations

Types

Link copied to clipboard
class ClassTypeKey<R>(val type: Class<R>, val isOptional: Boolean = false, val qualifier: Qualifier? = null) : TypeKey<R>
Link copied to clipboard
class Component

The Component stores the dependency providers which are than retrieved and instantiated by an instance of a graph.

Link copied to clipboard

Function signature alias for component builder DSL blocks.

Link copied to clipboard
class CyclicDependencyException(val key: TypeKey<*>, message: String, cause: Throwable? = null) : WinterException

Exception that is thrown when a cyclic dependency was detected.

Link copied to clipboard
class DependencyResolutionException(val key: TypeKey<*>, message: String, cause: Throwable? = null) : WinterException

Exception that is thrown when an error occurs during dependency resolution.

Link copied to clipboard
class EntryNotFoundException(val key: TypeKey<*>, message: String? = null) : WinterException

Exception that is thrown when a service was not found but was requested as non-optional.

Link copied to clipboard
typealias GCallback<R> = Graph.(R) -> Unit

Callback function signature with Graph as receiver.

Link copied to clipboard
Link copied to clipboard
abstract class GenericClassTypeKey<R>(val isOptional: Boolean = false, val qualifier: Qualifier? = null) : TypeKey<R>
Link copied to clipboard
typealias GFactory<R> = Graph.() -> R

Factory function signature with Graph as receiver.

Link copied to clipboard
class Graph

The object graph class that retrieves and instantiates dependencies registered in its component.

Link copied to clipboard
typealias Provider<R> = () -> R

Provider function signature.

Link copied to clipboard
value class Qualifier
Link copied to clipboard
interface TypeKey<out R>

Interface for all type keys.

Link copied to clipboard

The default WinterApplication object.

Link copied to clipboard

Holds the plugins, the application Component and the application Graph.

Link copied to clipboard
open class WinterException(message: String?, cause: Throwable? = null) : Exception

Base exception class of all exception thrown by Winter.

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
fun component(qualifier: Qualifier = ApplicationScope, block: ComponentBuilderBlock): Component

Create an instance of Component.

Link copied to clipboard

Returns a Component without qualifier and without any declared dependencies.

Link copied to clipboard

Returns a Graph with empty component.

Link copied to clipboard
inline fun <R> erased(qualifier: Qualifier? = null): TypeKey<R>

Returns TypeKey for type R with erased generics.

Link copied to clipboard
inline fun <R> generic(qualifier: Qualifier? = null): TypeKey<R>

Returns TypeKey for type R with generics information preserved.

Link copied to clipboard
fun graph(qualifier: Qualifier = ApplicationScope, block: ComponentBuilderBlock): Graph

Create an ad-hoc instance of Graph.

Link copied to clipboard
inline fun <R> Set<TypeKey<*>>.ofType(key: TypeKey<R> = erased()): Set<TypeKey<R>>
Link copied to clipboard
inline fun <T : Any> qualifier(): Qualifier
fun <E : Enum<E>> qualifier(value: E): Qualifier
Link copied to clipboard
Link copied to clipboard
inline fun <T : Any> KClass<T>.typeKey(qualifier: Qualifier? = null): ClassTypeKey<T>