autowire

Autowire a constructor, field or a method.

Autowire a constructor, field or a method. A constructor is autowired only when no member is passed as argument. When a member is passed as argument, it will be called with a list of references (where args are identified by their type FQN) in case when member is a function, or it will set the member to the value that is located in container by it's type FQN. Note: In case of constructors as well as methods that are overloaded, the first constructor or method from overload set is selected to be autowired.

  1. auto autowire(MetadataDecoratedGenericFactory!T factory)
  2. auto autowire(MetadataDecoratedGenericFactory!T factory)
  3. auto autowire(MetadataDecoratedGenericFactory!T factory)
    autowire
    (
    string member
    T
    )
    if (
    isField!(T, member)
    )

Parameters

T

the aggregate type

member

field or method of aggregate T

factory MetadataDecoratedGenericFactory!T

MetadataDecoratedGenericFactory where to inject the constructor or method configurer

Return Value

Type: auto

MetadataDecoratedGenericFactory!T

Meta