FoundationExtension
FoundationExtension is common Foundation/UIKit/Cocoa shortcuts and snippets collection.
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties Macros Pages
NSObject.h
Go to the documentation of this file.
1 //
2 // NSObject.h
3 // FoundationExtension
4 //
5 // Created by Jeong YunWon on 12. 10. 16..
6 // Copyright (c) 2012 youknowone.org All rights reserved.
7 //
8 
16 #import <Foundation/Foundation.h>
17 #import <objc/runtime.h>
18 
19 @class NSAMethod;
20 
26 
32 @property(nonatomic, readonly) NSString *className;
33 
48 - (id)performSelector:(SEL)sel withObject:(id)obj1 withObject:(id)obj2 withObject:(id)obj3;
49 
63 - (id)performSelector:(SEL)sel withObject:(id)obj1 withObject:(id)obj2 withObject:(id)obj3 withObject:(id)obj4;
64 
77 - (id)associatedObjectForKey:(void *)key;
78 
87 - (void)setAssociatedObject:(id)object forKey:(void *)key;
88 
99 - (void)setAssociatedObject:(id)object forKey:(void *)key policy:(objc_AssociationPolicy)policy;
100 
108 - (void)removeAssociatedObjectForKey:(void *)key;
109 
119 - (void)removeAssociatedObjectForKey:(void *)key policy:(objc_AssociationPolicy)policy;
120 
121 
122 @end
123 
128 
134 + (NSString *)name;
135 
141 + (Method)methodValueForSelector:(SEL)selector;
142 
148 + (NSAMethod *)methodObjectForSelector:(SEL)selector;
149 
155 + (Method)classMethodValueForSelector:(SEL)selector;
156 
162 + (NSAMethod *)classMethodObjectForSelector:(SEL)selector;
163 
169 + (IMP)methodImplementationForSelector:(SEL)selector;
170 
176 + (void)addMethodForSelector:(SEL)selector fromMethod:(NSAMethod *)method;
177 
183 + (void)addMethodForSelector:(SEL)selector implementation:(IMP)implementation types:(NSString *)implementationTypes;
184 
190 + (void)addClassMethodForSelector:(SEL)selector fromMethod:(NSAMethod *)method;
191 
197 + (void)addClassMethodForSelector:(SEL)selector implementation:(IMP)implementation types:(NSString *)implementationTypes;
198 
203 + (NSString *)className __deprecated;
204 
205 @end
206 
207 
213 @interface NSAMethod : NSObject {
214  Method _method;
215 }
216 
221 @property(nonatomic, readonly) Method method;
222 
229 @property(nonatomic, assign) IMP implementation;
230 
237 @property(weak, nonatomic, readonly) NSString *typeEncoding;
238 
245 - (void)exchangeImplementationWith:(NSAMethod *)method;
246 
247 @end
Method _method
Definition: NSObject.h:214
NSObject extensions.
Definition: NSObject.h:25
Class extensions.
Definition: NSObject.h:127
Object wrapper for Method.
Definition: NSObject.h:213