Provides a concise way to declare and encapsulate the architecture of an application in one or more classes that describe how components collaborate together. More...
Class Methods | |
(instancetype) | + assembly |
(instancetype) | + defaultAssembly |
Returns the [TyphoonComponentFactory defaultFactory] posing as a TyphoonAssembly. More... | |
Instance Methods | |
(instancetype) | - activate |
Activates the assembly. More... | |
(instancetype) | - activateWithCollaboratingAssemblies: |
Activates the assembly, explicitly setting the types for collaborating assemblies. More... | |
Instance Methods inherited from <TyphoonComponentFactory> | |
(NSArray *) | - allComponentsForType: |
Returns an array objects matching the given type. More... | |
(void) | - attachPostProcessor: |
Attach a TyphoonComponentFactoryPostProcessor to this component factory. More... | |
(id) | - componentForKey: |
Returns the component matching the given key. More... | |
(id) | - componentForKey:args: |
(id) | - componentForType: |
Returns an an instance of the component matching the supplied class or protocol. More... | |
(void) | - inject: |
Injects the properties and methods of an object. More... | |
(void) | - inject:withSelector: |
Injects the properties and methods of an object, described in definition. More... | |
(void) | - makeDefault |
Provides a concise way to declare and encapsulate the architecture of an application in one or more classes that describe how components collaborate together.
Prior to activation the assembly interface returns TyphoonDefinitions. After activation assembly interface poses in of a TyphoonComponentFactory to return built instances.
The TyphoonAssembly provides:
- (instancetype) activate |
Activates the assembly.
The concrete declared type of any collaborating assemblies will be used. If collaborating assemblies are backed by a protocol then they must be specified explicitly.
- (instancetype) activateWithCollaboratingAssemblies: | (NSArray *) | assemblies |
Activates the assembly, explicitly setting the types for collaborating assemblies.
assemblies | The explicit types to be used for collaborating assemblies. For example if this assembly references another assembly of type NetworkProvider, specifying a subclass TestNetworkProvider will override the base type. If collaborating assemblies are backed by a protocol, they must be specified explicitly. |
+ (instancetype) assembly |
+ (instancetype) defaultAssembly |
Returns the [TyphoonComponentFactory defaultFactory] posing as a TyphoonAssembly.