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
@SubModulefacet 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.modulewhich 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
addDependenciesistruethen 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
regOptionsparameter is deprecated. Use theoptionsfield 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:Boolspecifies if each service creation should be logged to INFO. Default isfalse. Set IoC's log level to debug for extensive info.disableProxies:Boolspecifies if all proxy generation for mixin fronted services should be disabled. Default isfalse.suppressStartupServiceList:Boolspecifies if the service list should be displayed on startup. Default isfalse.suppressStartupBanner:Boolspecifies if the Alien-Factory banner should be displayed on startup. Default isfalse.