ModifiableFactory<KEY extends Object, INSTANCE extends Object> class

Factory where builders can be added and removed at any time.

Inheritance
Mixed in types

Constructors

ModifiableFactory(Map<KEY, Builder<INSTANCE>> builders)
const

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>
inherited
contains(KEY key) bool
Checks if a builder is present in the factory.
inherited
copyBuildersFrom(Factory<KEY, INSTANCE> factory) Factory<KEY, INSTANCE>
inherited
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>
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
registerBuilder(KEY key, Builder<INSTANCE> builder) Factory<KEY, INSTANCE>
inherited
registerBuilders(Map<KEY, Builder<INSTANCE>> builders) Factory<KEY, INSTANCE>
inherited
toString() String
A string representation of this object.
inherited
unregisterBuilder(KEY key) Factory<KEY, INSTANCE>
inherited
unregisterBuilders(Iterable<KEY> keys) Factory<KEY, INSTANCE>
inherited

Operators

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