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)
    autowire
    (
    T
    )
    if (
    getMembersWithProtection!(T, "__ctor", "public").length > 0
    )
  2. auto autowire(MetadataDecoratedGenericFactory!T factory)
  3. auto autowire(MetadataDecoratedGenericFactory!T factory)

Parameters

T

the aggregate type

factory MetadataDecoratedGenericFactory!T

MetadataDecoratedGenericFactory where to inject the constructor or method configurer

Return Value

Type: auto

MetadataDecoratedGenericFactory!T

Meta