FactoryMethodContainerAdder

ContainerAdder that will scan a type for it's methods, and use them to create component factories out of their return type

@safe
struct FactoryMethodContainerAdder (
ByTypeComponentStoringPolicy = ComponentStoringPolicyImpl
ByMethodComponentStoringPolicy = ComponentStoringPolicy!(ChainedIdentityResolverPolicy!(QualifiedAnnotationIdentityResolverPolicy, IdentifierBasedIdentityResolverPolicy), StorageLocatorPolicyImpl, AliasingPolicyImpl)
ByTypeAliasingPolicy = TypeAliasingPolicy
) if (
isComponentStoringPolicy!ByTypeComponentStoringPolicy &&
isComponentStoringPolicy!ByMethodComponentStoringPolicy
&&
isAliasingPolicy!ByTypeAliasingPolicy
) {}

Members

Static functions

scan
void scan(Locator!() locator, Storage!(ObjectFactory, string) storage)

Scan T's methods, for methods annotated with @component annotation, transform them into component factories that will use them to create components of returned type.

Variables

isModule
enum bool isModule(alias T);

Check if symbol T is a type or module

isSupported
enum bool isSupported(alias T);
isType
enum bool isType(alias T);

Check if symbol T is a type or module

Meta