Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
|
|
@ -0,0 +1,23 @@
|
|||
#import <Foundation/Foundation.h>
|
||||
#import <objc/runtime.h>
|
||||
|
||||
@interface Foo : NSObject
|
||||
@end
|
||||
@implementation Foo
|
||||
- (int)bar:(double)x {
|
||||
return 42;
|
||||
}
|
||||
@end
|
||||
|
||||
int main() {
|
||||
unsigned int methodCount;
|
||||
Method *methods = class_copyMethodList([Foo class], &methodCount);
|
||||
for (unsigned int i = 0; i < methodCount; i++) {
|
||||
Method m = methods[i];
|
||||
SEL selector = method_getName(m);
|
||||
const char *typeEncoding = method_getTypeEncoding(m);
|
||||
NSLog(@"%@\t%s", NSStringFromSelector(selector), typeEncoding);
|
||||
}
|
||||
free(methods);
|
||||
return 0;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue