SingleByTagInstanceFactory<T> class

InjectFactory that stores singleton instances per tag.

Inheritance

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
taggedSingletons Map<String, T>
Map of singleton instances of T per each String tag.
getter/setter pairinherited

Methods

close() → void
Closes all instances of singleton if they implement Closable Cleans up the singleton map.
inherited
create() → T
Creates a instance of T
inherited
createForTag(String? tag) → T
Creates a T instance for a tag. If instance of T exists in singleton map it will return it without creation of new.
override
createTagged(String? tag) → T
Method that checks if instance is already in singleton map before creating new instance of T
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
put(String? tag, T instance) → void
Adds instance for a given tag, overriding old value if exists.
toString() String
A string representation of this object.
inherited

Operators

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