Package guru.zoroark.tegral.di.extensions

Types

Link copied to clipboard
class AliasDeclaration<TAlias : Any, TTarget : TAlias>(aliasIdentifier: Identifier<TAlias>, val targetIdentifier: Identifier<TTarget>) : ResolvableDeclaration<TAlias>

Declaration for aliases. Use putAlias to create such an alias.

Link copied to clipboard
interface DeclarationsProcessor

Interface for classes that need to process some declarations in order to work properly.

Link copied to clipboard
interface DeclarationTag

A declaration tag is data added to a Declaration that can be processed by (installable) extensions via a DeclarationsProcessor.

Link copied to clipboard
class DeclarationTags

A list of declaration tags, used for easier DSL usage.

Link copied to clipboard

Default implementation for ExtensibleInjectionEnvironment.

Link copied to clipboard
class EagerImmutableMetaEnvironment(context: EnvironmentContext) : InjectionEnvironment

An injection environment implementation with an eager evaluation strategy.

Link copied to clipboard
interface ExtensibleContextBuilderDsl : ContextBuilderDsl

A context builder which can also receive meta-environment components via the meta function.

Link copied to clipboard
class ExtensibleEnvironmentContext(val declarations: Declarations, val metaContext: EnvironmentContext)

A context for ExtensibleInjectionEnvironments. Provides both the regular set of declarations plus a subcontext for the meta-environment.

Link copied to clipboard

Default builder for extensible environment contexts using the DSL.

Link copied to clipboard
interface ExtensibleInjectionEnvironment : InjectionEnvironment

An extensible injection environment is an injection environment that supports extensions.

Link copied to clipboard

Equivalent of InjectionEnvironmentKind for environments that support installable extensions.

Functions

Link copied to clipboard

Performs the internal logic required for setting up a meta-environment. When creating extensible environments, you should either call this function to create your meta environment, or subclass DefaultExtensibleInjectionEnvironment which will do it for you.

Link copied to clipboard
fun <T : Any> Sequence<Identifier<*>>.filterSubclassesOf(environment: ExtensibleInjectionEnvironment, kclass: KClass<T>): Sequence<Identifier<T>>

Filters the given identifiers to only include those whose actual object are subclasses of the given class parameter.

Link copied to clipboard
operator fun DeclarationTag.plus(otherTag: DeclarationTag): DeclarationTags

Puts two tags together into a new DeclarationTags instance.

operator fun DeclarationTags.plus(otherTag: DeclarationTag): DeclarationTags

Convenience function for adding the given tag to this DeclarationTags object, then returns said object.

Link copied to clipboard
inline fun <TAlias : Any, TTarget : TAlias> ContextBuilderDsl.putAlias(aliasQualifier: Qualifier = EmptyQualifier, targetQualifier: Qualifier = EmptyQualifier): Declaration<TAlias>
fun <TAlias : Any, TTarget : TAlias> ContextBuilderDsl.putAlias(    aliasClass: KClass<TAlias>,     aliasQualifier: Qualifier = EmptyQualifier,     targetClass: KClass<TTarget>,     targetQualifier: Qualifier = EmptyQualifier): Declaration<TAlias>

Adds an alias to another component within this environment.

Link copied to clipboard
infix fun <T : Any> Declaration<T>.with(tag: DeclarationTag): Declaration<T>

Adds the given tag to this declaration.

infix fun <T : Any> Declaration<T>.with(tags: DeclarationTags): Declaration<T>
infix fun <T : Any> Declaration<T>.with(tags: List<DeclarationTag>): Declaration<T>

Adds the given tags to this declaration.