forked from jessegrosjean/blocks
-
Notifications
You must be signed in to change notification settings - Fork 1
/
BExecutableExtensionProxy.m
42 lines (32 loc) · 1009 Bytes
/
BExecutableExtensionProxy.m
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
30
31
32
33
34
35
36
37
38
39
40
41
42
//
// BExecutableExtensionProxy.m
// Blocks
//
// Created by Jesse Grosjean on 8/22/07.
// Copyright 2007 Blocks. All rights reserved.
//
#import "BExecutableExtensionProxy.h"
#import "BConfigurationElement.h"
#import "BLog.h"
@implementation BExecutableExtensionProxy
#pragma mark Init
- (id)initWithConfigurationElement:(BConfigurationElement *)aConfigurationElement attributeName:(NSString *)anAttributeName {
configurationElement = aConfigurationElement;
attributeName = anAttributeName;
return self;
}
#pragma mark Delegate
- (id)delegate {
if (!delegate) {
delegate = [configurationElement createExecutableExtensionFromAttribute:attributeName];
BLogAssert(delegate != nil, @"proxied object should have been created.");
}
return delegate;
}
- (NSMethodSignature*)methodSignatureForSelector:(SEL)selector {
return [[self delegate] methodSignatureForSelector:selector];
}
- (void)forwardInvocation:(NSInvocation*)invocation {
[invocation invokeWithTarget:[self delegate]];
}
@end