SamFactory class

The factory used to create one or more SamModel instances using the SamAction, SamState and SamView instances as patterns.

The totality of the SamAction, SamState, SamView and SamModel is referred to as the Sam Complex.

The SamFactory is used as a base class and the SamFactory.formatTrifecta method is supplied that is used to format (prepare) the SamAction, SamState and SamView instances.

This prepared factory can be used to make one or more SamModel instances using tha SamModel.makeModel method.

The SamFactory is designed to be disposable in that at the end of the build process for a complex the pointers to the SamFactory are nullified. This means any data in the SamFactory instance needed beyond building the complex should be migrated to the SamModel (or SamAction if that data is shareable).

The SamFactory must have a companion Enum as described at Enums. This is passed in with the constructor

Constructors

SamFactory(List enums)
Creates SamFactory extension and associates it with enums. [...]

Properties

enums List
Storage for valid names associated with model
read / write
enumTypes List<Type>
Storage for valid types associated with model. [...]
read / write
hashCode int
The hash code for this object. [...]
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

formatTrifecta(SamAction sa, SamState ss, SamView sv) → dynamic
Abstract method that must be supplied to format the SamAction, SamState and SamView instances.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() String
Returns a string representation of this object.
inherited

Operators

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