DependencyMetadata class

Contains metadata for a Dependency to facilitate lifecycle management, track registration details, and support dependency resolution.

Constructors

DependencyMetadata({Entity groupEntity = const DefaultEntity(), Entity preemptivetypeEntity = const DefaultEntity(), Option<int> index = const None(), Option<TOnUnregisterCallback<Object>> onUnregister = const None()})

Properties

groupEntity Entity
The type group to which the Dependency belongs. This enables dependencies of the same type to coexist in the DI container as long as they are assigned to different groups.
final
hashCode int
The hash code for this object.
no setteroverride
index Option<int>
The index at which this dependency was registered in the dependency injection container. This helps in tracking the order of registration and ensuring proper management of dependencies.
final
initialType Option<Type>
The runtime type of the wrapped value at the moment the dependency was first registered. Stable across Dependency.passNewValue swaps, so it always reflects the original registration type.
no setter
onUnregister Option<TOnUnregisterCallback<Object>>
A callback to be invoked when this dependency is unregistered.
final
preemptivetypeEntity Entity
An explicit type key for this dependency. When not DefaultEntity, this overrides the runtime type of the wrapped value as the registry key.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

copyWith({Entity groupEntity = const DefaultEntity(), Entity preemptivetypeEntity = const DefaultEntity(), Option<Type> initialType = const None(), Option<int> index = const None(), Option<TOnUnregisterCallback<Object>> onUnregister = const None()}) DependencyMetadata
Creates a new instance with updated fields, preserving the values of any fields not explicitly specified.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
override