classafIoc::MappedConfig

sys::Obj
  afIoc::MappedConfig

Passed into module contribution methods to allow the method to, err, contribute!

A service can collect contributions in three different ways:

  • As an unordered list of values
  • As an ordered list of values
  • As a map of keys and values

The service defines the type of contribution by declaring a parameterised list or map in its ctor or builder method. Contributions must be compatible with the type.

addMapped

Source

Void addMapped(Obj key, Obj? val)

Adds a keyed object to the service's configuration.

addMappedAll

Source

Void addMappedAll(Obj:Obj? objects)

Adds all the mapped objects to a service's configuration.

addOverride

Source

Void addOverride(Obj existingKey, Obj overrideKey, Obj? overrideVal)

Overrides an existing contribution by its key. The key must exist.

@since 1.2

autobuild

Source

Obj autobuild(Type type, Obj?[] ctorArgs := Obj#.emptyList())

A util method to instantiate an object, injecting any dependencies. See Registry.autobuild.

toStr

Source

virtual override Str toStr()

validateKey

Source

Obj validateKey(Obj key, Bool isOverrideKey)

validateVal

Source

Obj? validateVal(Obj? val)