ModifiableFactoryMixin<KEY extends Object, INSTANCE extends Object> mixin

A mixin that makes a Factory into a ModifiableFactory where builders can be added and removed at any time.

Superclass Constraints
Mixin Applications

Properties

builders Map<KEY, Builder<INSTANCE>>
Unmodifiable list of builders.
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
isEmpty bool
Checks if the factory is empty.
no setterinherited
isNotEmpty bool
Checks if the factory is not empty.
no setterinherited
keys Iterable<KEY>
Iterable of keys.
no setterinherited
length int
Number of builders in the factory.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

buildException(KEY key) BuilderNotFoundInFactoryException
Used by subclasses to override exception.
inherited
clear() Factory<KEY, INSTANCE>
contains(KEY key) bool
Checks if a builder is present in the factory.
inherited
copyBuildersFrom(Factory<KEY, INSTANCE> factory) Factory<KEY, INSTANCE>
createInstance(KEY key, [Object? request]) → INSTANCE
Finds and runs the builder to create an instance.
inherited
doesNotContain(KEY key) bool
Checks if a builder is absent in the factory.
inherited
getBuilder(KEY key) Builder<INSTANCE>
Returns a builder, when a key is provided.
inherited
mergeWith(Factory<KEY, INSTANCE> factory) Factory<KEY, INSTANCE>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
registerBuilder(KEY key, Builder<INSTANCE> builder) Factory<KEY, INSTANCE>
registerBuilders(Map<KEY, Builder<INSTANCE>> builders) Factory<KEY, INSTANCE>
toString() String
A string representation of this object.
inherited
unregisterBuilder(KEY key) Factory<KEY, INSTANCE>
unregisterBuilders(Iterable<KEY> keys) Factory<KEY, INSTANCE>

Operators

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