classafIoc::RegistryBuilder

sys::Obj
  afIoc::RegistryBuilder

Use to create an IoC Registry. Modules may be added manually, defined by meta-data in dependent pods or defined by index properties

addModule

Source

This addModule(Type moduleType)

Adds a module to the registry. Any modules defined with the @SubModule facet are also added.

addModules

Source

This addModules(Type[] moduleTypes)

Adds many modules to the registry

addModulesFromIndexProperties

Source

This addModulesFromIndexProperties()

Looks for all index properties of key afIoc.module which defines a qualified name of a module to load.

addModulesFromPod

Source

This addModulesFromPod(Pod pod, Bool addDependencies := true)

Inspects the pod's meta-data for the key afIoc.module. This is then treated as a CSV list of (qualified) module type names to load.

If addDependencies is true then the pod's dependencies are also inspected for IoC modules.

build

Source

Registry build([Str:Obj?]? regOptions := null)

Constructs and returns the registry; this may only be done once. The caller is responsible for invoking Registry.startup.

The regOptions parameter is deprecated. Use the options field instead.

moduleTypes

Source

Type[] moduleTypes()

Returns a list of modules types currently held by this builder.

options

Source

Str:Obj? options { private set }

All User and IoC options may be later retrieved from the RegistryOptions service.

The following option keys are reserved for use by IoC:

  • logServiceCreation: Bool specifies if each service creation should be logged to INFO. Default is false. Set IoC's log level to debug for extensive info.
  • disableProxies: Bool specifies if all proxy generation for mixin fronted services should be disabled. Default is false.
  • suppressStartupServiceList: Bool specifies if the service list should be displayed on startup. Default is false.
  • suppressStartupBanner: Bool specifies if the Alien-Factory banner should be displayed on startup. Default is false.