Methods

appendMappingConfig(config:Map<String, DependencyVo>):IAppFactory

Will create type mapping, value mappings and inject dependencies, using config data. @return

Parameters:

config

map of DependencyVo

clear():IAppFactory

Clears of pools and mappings of current IAppFactory.

clearMappings():IAppFactory

Clears of mappings of current IAppFactory.

clearPools():IAppFactory

Clears all pools of current IAppFactory.

destroyInstance<T>(instance:T):Void

getProvider<T>(className:ClassName, ?name:MappingName):IDependencyProvider<T>

increasePoolCapacity<T>(type:ClassRef<T>, additionalCapacity:Int):IAppFactory

Increases pool capacity/

Parameters:

type

Type of pool

null

additionalCapacity

increasePoolCapacityByClassName(className:String, additionalCapacity:Int):IAppFactory

injectInto(target:IInjectorAcceptor):Void

mapClassNameToSingleton<T>(className:ClassName, type:Class<T>, ?name:MappingName):Void

mapClassNameToType<T>(className:ClassName, type:Class<T>, ?name:MappingName):Void

mapClassNameToValue<T>(className:ClassName, value:T, ?name:MappingName):Void

mapToSingleton<T>(clazz:ClassRef<T>, type:Class<T>, ?name:MappingName):Void

mapToType<T>(clazz:ClassRef<T>, type:Class<T>, ?name:MappingName):Void

mapToValue<T>(clazz:ClassRef<T>, value:T, ?name:MappingName):Void

@:value({ isBusyFlagGetterName : null, instantiateNow : false, capacity : 5 })registerPool<T>(type:ClassRef<T>, capacity:Int = 5, instantiateNow:Bool = false, ?isBusyFlagGetterName:String):IAppFactory

Registers pool for instances of provided type.

Parameters:

type

Type of object to register pool for

capacity

Maximum objects of current type in pool

instantiateNow

Create instances immediately

constructorArgs

Constructor arguments, in case instantiateNow is true.

isBusyFlagGetterName

The name of public getter. If specified, then this method will be called, to check if current object can be re-used right now. If specified and returns true, then next item of pool will be checked. Can be any type. Use Array, if need to pass several args.

@:value({ isBusyFlagGetterName : null, instantiateNow : false, capacity : 5 })registerPoolByClassName<T>(className:String, capacity:Int = 5, instantiateNow:Bool = false, ?isBusyFlagGetterName:String):IAppFactory

setSafePool(value:Bool):IAppFactory

Avoid stack overflow and increase pool capacity up to 1, if all pool items are busy. Default is true.

Parameters:

null

value

unmap<T>(type:ClassRef<T>, ?name:MappingName):Void

unmapClassName(className:ClassName, ?name:MappingName):Void

unregisterPool<T>(type:ClassRef<T>):IAppFactory

Unregisters and disposes pool for provided type.

Parameters:

type

Type of object to register pool for