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
This addModule(Type moduleType)
Adds a module to the registry. Any modules defined with the
@SubModule
facet are also added.- addModules
This addModules(Type[] moduleTypes)
Adds many modules to the registry
- addModulesFromIndexProperties
This addModulesFromIndexProperties()
Looks for all index properties of key
afIoc.module
which defines a qualified name of a module to load.- addModulesFromPod
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
istrue
then the pod's dependencies are also inspected for IoC modules.- build
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 theoptions
field instead.- moduleTypes
Type[] moduleTypes()
Returns a list of modules types currently held by this builder.
- options
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 isfalse
. 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 isfalse
.suppressStartupServiceList
:Bool
specifies if the service list should be displayed on startup. Default isfalse
.suppressStartupBanner
:Bool
specifies if the Alien-Factory banner should be displayed on startup. Default isfalse
.