TyphoonAssembly

Objective-C

@interface TyphoonAssembly : NSObject

Swift

class TyphoonAssembly : NSObject
  • @ingroup Factory *
  • Provides a concise way to declare and encapsulate the architecture of an application in one or more classes that describe
  • how components collaborate together. *
  • Besides declaring an application architecture at build-time, the assembly interface serves an additional purpose at runtime: we can
  • resolve components using the method name on the interface. *
  • ## Example: *
  • “`

MyAssemblyType* assembly = [factory asAssembly]; //Use the assembly interface instead of a ‘magic string’ AnalyticsService* service = [assembly analyticsService];

*
* The TyphoonAssembly provides:
*
* - a way to easily define multiple components of the same class or protocol
* - Avoids the use of "magic strings" for component resolution and wiring
* - Allows the use of IDE features like refactoring and code completion.
*
  • Undocumented

    Declaration

    Objective-C

    + (instancetype)assembly;
  • Returns the [TyphoonComponentFactory defaultFactory], with components exposed using an assembly interface.

    Declaration

    Objective-C

    + (instancetype)defaultAssembly;

    Swift

    class func `default`() -> Self!
  • Undocumented

    Declaration

    Objective-C

    + (void)markSelectorReserved:(SEL)selector;

    Swift

    class func markSelectorReserved(_ selector: Selector!)
  • Undocumented

    Declaration

    Objective-C

    - (TyphoonComponentFactory *)asFactory;

    Swift

    func asFactory() -> TyphoonComponentFactory!