Activatory class

Constructors

Activatory({int seed})
Creates new instance of Activatory with predefined seed. [...]
Activatory.fromRandom(Random random)
Create new instance of Activatory with predefined random generator.

Properties

defaultCustomization TypeCustomization
Returns default customization which is used to activate not customized object types. Use returned value to customize default activation options.
read-only
hashCode int
The hash code for this object. [...]
read-only, inherited
random Random
final
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

customize<T>({Object key}) TypeCustomization
Returns customization for specified type T and key. If key is not specified type default configuration will be returned. Type default configuration is used while activation in next cases: [...]
get<T>({Object key}) → T
Creates and returns instance of specified type T filled with random data recursively. Uses key to select configuration.
getMany<T>({int count, Object key}) List<T>
Creates and returns multiple instances of specified type T filled with random data recursively. Returns List of size count. If count is not specified default strategy will be used. Uses key to select configuration.
getManyUntyped(Type type, {int count, Object key}) List<Object>
Creates and returns multiple instances of specified type filled with random data recursively. Returns List of size count. If count is not specified default strategy will be used. Uses key to select configuration.
getUntyped(Type type, {Object key}) Object
Creates and returns instance of specified type filled with random data recursively. Uses key to select configuration.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
replaceSupperClass<TSource, TTarget extends TSource>() → void
Marks TTarget as replacement for TSource activation calls. [...]
take<T>(Iterable<T> variations, {Iterable<T> except}) → T
Returns one random item from variations excluding items from except. variations and except will be iterated while choosing item.
takeMany<T>(Iterable<T> variations, {int count, Iterable<T> except}) List<T>
Returns count random items from variations excluding items from except. variations and except will be iterated while choosing item.
takeManyUntyped(Iterable variations, {int count, Iterable except}) List<Object>
Returns count random items from variations excluding items from except. variations and except will be iterated while choosing item.
takeUntyped(Iterable variations, {Iterable except}) Object
Returns one random item from variations excluding items from except. variations and except will be iterated while choosing item.
toString() String
A string representation of this object. [...]
inherited
useFunction<T>(FactoryDelegate<T> generator, {Object key}) → void
Registers function to be called to activate instance of type T with key.
useGeneratedSingleton<T>({Object key}) → void
Creates instance of type T and fixes it as a result for subsequent activation calls for type T with customization key. [...]
useOneOf<T>(Iterable<T> values, {Object key}) → void
useSingleton<T>(T value, {Object key}) → void
Fixes passed value as a result for subsequent activation calls for type T with customization key.

Operators

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