Defines a protocol for resolving built instances, injecting a pre-obtained instance using a factory containing definitions from one or more TyphoonAssembly classes.
More...
Defines a protocol for resolving built instances, injecting a pre-obtained instance using a factory containing definitions from one or more TyphoonAssembly classes.
- (NSArray *) allComponentsForType: |
|
(id) |
classOrProtocol |
|
Returns an array objects matching the given type.
- See also
- componentForType
Attach a TyphoonComponentFactoryPostProcessor to this component factory.
- Parameters
-
postProcessor | The post-processor to attach. |
- (id) componentForKey: |
|
(NSString *) |
key |
|
Returns the component matching the given key.
For the block-style, this is the name of the method on the TyphoonAssembly interface, although, for block-style you'd typically use the assembly interface itself for component resolution.
- (id) componentForType: |
|
(id) |
classOrProtocol |
|
Returns an an instance of the component matching the supplied class or protocol.
For example:
[factory objectForType:[Knight class]];
[factory objectForType:@protocol(Quest)];
- Exceptions
-
NSInvalidArgumentException | When no singletons or prototypes match the requested type. |
NSInvalidArgumentException | When when more than one singleton or prototype matches the requested type. |
- Warning
- componentForType with a protocol argument is not currently supported in Objective-C++.
- See also
- : - allComponentsForType:
- (void) inject: |
|
(id) |
instance |
|
Injects the properties and methods of an object.
- (void) inject: |
|
(id) |
instance |
withSelector: |
|
(SEL) |
selector |
|
|
| |
Injects the properties and methods of an object, described in definition.