-
Notifications
You must be signed in to change notification settings - Fork 223
/
JSObjectionModule.h
executable file
·29 lines (23 loc) · 1.08 KB
/
JSObjectionModule.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#import <Foundation/Foundation.h>
@class JSObjectionInjector;
@protocol JSObjectionProvider<NSObject>
- (id)provide:(JSObjectionInjector *)context;
@end
@interface JSObjectionModule : NSObject {
NSMutableDictionary *_bindings;
NSMutableSet *_eagerSingletons;
}
@property (nonatomic, readonly) NSDictionary *bindings;
@property (nonatomic, readonly) NSSet *eagerSingletons;
- (void)bind:(id)instance toClass:(Class)aClass;
- (void)bind:(id)instance toProtocol:(Protocol *)aProtocol;
- (void)bindMetaClass:(Class)metaClass toProtocol:(Protocol *)aProtocol;
- (void)bindProvider:(id<JSObjectionProvider>)provider toClass:(Class)aClass;
- (void)bindProvider:(id<JSObjectionProvider>)provider toProtocol:(Protocol *)aProtocol;
- (void)bindClass:(Class)aClass toProtocol:(Protocol *)aProtocol;
- (void)bindClass:(Class)aClass toClass:(Class)toClass;
- (void)bindBlock:(id (^)(JSObjectionInjector *context))block toClass:(Class)aClass;
- (void)bindBlock:(id (^)(JSObjectionInjector *context))block toProtocol:(Protocol *)aProtocol;
- (void)registerEagerSingleton:(Class)klass;
- (void)configure;
@end