CreatorSingleInjectFactory<T> class

Singleton InjectFactory for a T type. It wil create an object using Creator method and store as singleton for future injections.

Inheritance

Constructors

CreatorSingleInjectFactory(Creator<T> creatorDelegate)
Creates instance for this InjectFactory with Creator function.

Properties

creatorDelegate Creator<T>
Creator delegate to create the instance.
getter/setter pair
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 an instance for a tag.
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
toString() String
A string representation of this object.
inherited

Operators

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