FactoryResolvingStrategy enum

Defines strategy of selecting backend for activation.

Constants

TakeDefaultCtor → const FactoryResolvingStrategy

Take default ctor for complex type. Default ctor is the one called during evaluating new T() expression. This can be factory, const or usual ctor. If type doesn't have public default ctor or type is not complex ActivationException will be thrown.

const FactoryResolvingStrategy(3)
TakeFirstDefined → const FactoryResolvingStrategy

Take first available factory. If overrides was provided latest one will be used. If no overrides was provided will be used:

  • random value factory for primitive types;
  • random value factory enums;
  • fist defined ctor for complex type.
const FactoryResolvingStrategy(0)
TakeRandom → const FactoryResolvingStrategy

Take random available factory. If overrides was provided random one will be chosen from overrides. If no overrides are provided will be used:

  • random value factory for primitive types;
  • random value factory enums;
  • random ctor for complex type.
const FactoryResolvingStrategy(2)
TakeRandomNamedCtor → const FactoryResolvingStrategy

Take random named ctor for complex type. If type doesn't have public named ctor or type is not complex ActivationException will be thrown.

const FactoryResolvingStrategy(1)
values → const List<FactoryResolvingStrategy>

A constant List of the values in this enum, in order of their declaration.

const List<FactoryResolvingStrategy>

Properties

hashCode int
The hash code for this object. [...]
read-only, inherited
index int

The integer index of this enum.

final
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() String
A string representation of this object. [...]
override

Operators

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