
Properties | |
| BOOL | abstract |
| If set, designates that a component can not be instantiated directly. More... | |
| TyphoonAutoInjectVisibility | autoInjectionVisibility |
| Specifies visibility for for AutoInjection. More... | |
| id | parent |
| A parent component. More... | |
| TyphoonScope | scope |
| The scope of the component, default being TyphoonScopeObjectGraph. More... | |
| Class | type |
Class Methods | |
| (id) | + withClass: |
| (id) | + withClass:configuration: |
| (id) | + withFactory:selector: |
| A component that will produce an instance (with or without parameters) of this component. More... | |
| (id) | + withFactory:selector:parameters: |
| (id) | + withFactory:selector:parameters:configuration: |
| (id) | + withOption:matcher: |
| Returns definition matching 'option', specified in 'matcherBlock'. More... | |
| (id) | + withOption:matcher:autoInjectionConfig: |
| (id) | + withOption:yes:no: |
| if boolean 'option' value is YES, then return yesInjection, otherwise return noInjection More... | |
| (id) | + withParent:class: |
| Returns a definition that inherits initializer injections, property injections, method injections and scope from the specified parent definition. More... | |
| (id) | + withParent:class:configuration: |
| Returns a definition that inherits initializer injections, property injections, method injections and scope from the specified parent definition, adding the specified configuration. More... | |
Instance Methods | |
| (void) | - injectMethod:parameters: |
| Injects method specified by selector with parameters. More... | |
| (void) | - injectProperty: |
| Injects property with a component from the container that matches the type (class or protocol) of the property. More... | |
| (void) | - injectProperty:with: |
| Injects property for gives selector with injection, where injection can be. More... | |
| (id) | - keyPath: |
| Returns injection which can be used for example in injectProperty:with: method This method will injects valueForKeyPath: with given keyPath. More... | |
| (void) | - performAfterInjections: |
| A custom callback methods that is invoked after properties and method injection occurs. More... | |
| (void) | - performAfterInjections:parameters: |
| (void) | - performBeforeInjections: |
| A custom callback methods that is invoked before properties and method injection occurs. More... | |
| (void) | - performBeforeInjections:parameters: |
| (id) | - property: |
| Returns injection which can be used for example in injectProperty:with: method This method will injects result of selector invocation. More... | |
| (void) | - useInitializer: |
| Convenience method to use a no-args initializer. More... | |
| (void) | - useInitializer:parameters: |
| Injects initializer specified by selector and parameters. More... | |
|
readwritenonatomicassign |
If set, designates that a component can not be instantiated directly.
|
readwritenonatomicassign |
Specifies visibility for for AutoInjection.
AutoInjection performs when using method:
|
readwritenonatomicstrong |
A parent component.
When parent is defined the initializer and/or properties from a definition are inherited, unless overridden. Example:
|
readwritenonatomicassign |
The scope of the component, default being TyphoonScopeObjectGraph.
|
readnonatomicassign |
| - (void) injectMethod: | (SEL) | selector | |
| parameters: | (void(^)(TyphoonMethod *method)) | parametersBlock | |
Injects method specified by selector with parameters.
| - (void) injectProperty: | (SEL) | withSelector |
Injects property with a component from the container that matches the type (class or protocol) of the property.
| - (void) injectProperty: | (SEL) | selector | |
| with: | (id) | injection | |
Injects property for gives selector with injection, where injection can be.
| - (id) keyPath: | (NSString *) | keyPath |
Returns injection which can be used for example in injectProperty:with: method This method will injects valueForKeyPath: with given keyPath.
| keyPath | path used as argument while calling valueForKeyPath: on resolved definition |
| - (void) performAfterInjections: | (SEL) | sel |
A custom callback methods that is invoked after properties and method injection occurs.
| - (void) performAfterInjections: | (SEL) | sel | |
| parameters: | (void(^)(TyphoonMethod *param)) | parameterBlock | |
| - (void) performBeforeInjections: | (SEL) | sel |
A custom callback methods that is invoked before properties and method injection occurs.
| - (void) performBeforeInjections: | (SEL) | sel | |
| parameters: | (void(^)(TyphoonMethod *params)) | parametersBlock | |
| - (id) property: | (SEL) | selector |
Returns injection which can be used for example in injectProperty:with: method This method will injects result of selector invocation.
| selector | selector to invoke on resolved definition |
| - (void) useInitializer: | (SEL) | selector |
Convenience method to use a no-args initializer.
| - (void) useInitializer: | (SEL) | selector | |
| parameters: | (void(^)(TyphoonMethod *initializer)) | parametersBlock | |
Injects initializer specified by selector and parameters.
Initializer allow you to create object with special selector and params. Without this injection, object will be created by 'alloc-init' calls
| + (id) withClass: | (Class) | clazz |
| + (id) withClass: | (Class) | clazz | |
| configuration: | (TyphoonDefinitionBlock) | injections | |
| + (id) withFactory: | (id) | factory | |
| selector: | (SEL) | selector | |
A component that will produce an instance (with or without parameters) of this component.
For example:
| + (id) withFactory: | (id) | factory | |
| selector: | (SEL) | selector | |
| parameters: | (void(^)(TyphoonMethod *factoryMethod)) | params | |
| + (id) withFactory: | (id) | factory | |
| selector: | (SEL) | selector | |
| parameters: | (void(^)(TyphoonMethod *factoryMethod)) | params | |
| configuration: | (void(^)(TyphoonFactoryDefinition *definition)) | configuration | |
| + (id) withOption: | (id) | option | |
| matcher: | (TyphoonMatcherBlock) | matcherBlock | |
Returns definition matching 'option', specified in 'matcherBlock'.
Provided by category TyphoonDefinition(Option).
| + (id) withOption: | (id) | option | |
| matcher: | (TyphoonMatcherBlock) | matcherBlock | |
| autoInjectionConfig: | (void(^)(id< TyphoonAutoInjectionConfig > config)) | configBlock | |
Provided by category TyphoonDefinition(Option).
| + (id) withOption: | (id) | option | |
| yes: | (id) | yesInjection | |
| no: | (id) | noInjection | |
if boolean 'option' value is YES, then return yesInjection, otherwise return noInjection
Provided by category TyphoonDefinition(Option).
| + (id) withParent: | (id) | parent | |
| class: | (Class) | clazz | |
Returns a definition that inherits initializer injections, property injections, method injections and scope from the specified parent definition.
Parent definitions can be chained.
| + (id) withParent: | (id) | parent | |
| class: | (Class) | clazz | |
| configuration: | (TyphoonDefinitionBlock) | injections | |
Returns a definition that inherits initializer injections, property injections, method injections and scope from the specified parent definition, adding the specified configuration.
Parent definitions can be chained.