classafIoc::InjectionCtx

sys::Obj
  afIoc::InjectionCtx

Passed to DependencyProviders to give contextual injection information.

dependencyType

Source

Type dependencyType { internal set }

The Type to be injected. This is the declared type of the field or method parameter.

field

Source

const Field? field

The field to be injected. Only available for field injection.

fieldFacets

Source

const Facet[] fieldFacets

The facets of the field to be injected. Is never null, but may be empty.

injectionKind

Source

const InjectionKind injectionKind

The type of injection.

log

Source

Void log(Str msg)

Logs the message at IoC debug level.

method

Source

const Method? method

The method to be injected. Only available for method injection.

methodFacets

Source

const Facet[] methodFacets

The facets of the method to be injected. Is never null, but may be empty.

methodParam

Source

Param? methodParam { internal set }

The method Param to be injected. Only available for method injection.

methodParamIndex

Source

Int? methodParamIndex { internal set }

The index of the method Param to be injected. Only available for method injection.

target

Source

Obj? target

The object that will receive the injection. Only available for field and (non-static) method injection.

targetType

Source

const Type? targetType

The Type of the object that will receive the injection. Not available during dependencyByType.

track

Source

Obj? track(Str description, |->Obj? operation)

Adds an nested operation description. This provides contextual information in the event of an Err. Example:

ctx,track("Doing complicated stuff") |->Obj?| {
   return stuff()
}