mixinafIoc::InjectionCtx
afIoc::InjectionCtx
@
Js
Passed to DependencyProviders to give contextual injection information.
- field
abstract Field? field()
The field to be injected. Only available for field injection.
- func
abstract Func? func()
The func to be injected. Only available for func injection.
- funcArgIndex
Int? funcArgIndex()
Returns the index into
funcArgs
should it be applicable,null
otherwise. This takes into account any service configuration injection (if applicable).- funcArgs
abstract Obj?[]? funcArgs()
Provided arguments to call the func with.
- funcParam
abstract Param? funcParam()
The func
Param
to be injected. Only available for func injection.- funcParamIndex
abstract Int? funcParamIndex()
The index of the func
Param
to be injected. Only available for func injection.- funcTakesServiceConfig
virtual Bool funcTakesServiceConfig()
Returns
true
if the first parameter of the func should be aMap
orList
service configuration.- isFieldInjection
Bool isFieldInjection()
Returns
true
if performing field injection.- isFuncArgItBlock
Bool isFuncArgItBlock()
Returns
true
if injecting a ctor it-block- isFuncArgProvided
Bool isFuncArgProvided()
Returns
true
if an argument has been provided for this func parameter injection.- isFuncArgReserved
Bool isFuncArgReserved()
Returns
true
if the func argument has been reserved by system providers; namely if the parameter is:- service configuration
- a provider func argument
- a ctor it-block
- isFuncArgServiceConfig
Bool isFuncArgServiceConfig()
Returns
true
if injecting aMap
orList
service configuration.- isFuncInjection
Bool isFuncInjection()
Returns
true
if performing func (or method) injection.Convenience for
func != null
.- isMethodInjection
Bool isMethodInjection()
Returns
true
if performing method injection.Convenience for
func != null && func.method != null
.- method
Method? method()
The method to be injected. Only available for some func injection.
Convenience for
func?.method
.- serviceId
abstract Str? serviceId()
The id of the service (if any) that is being created.
- targetInstance
abstract Obj? targetInstance()
The object that will receive the injection.
- targetType
abstract Type? targetType()
The
Type
of object that will receive the injection. This is the parentType
that contains the field or method. Isnull
when resolving parameters for a pure / non-method func.