FMSSwizzler
 All Classes Files Functions Typedefs Enumerations Enumerator
NSObject+FMSSwizzler.h
Go to the documentation of this file.
1 //
2 // NSObject+FMSSwizzler.h
3 // FMSSwizzler
4 //
5 // Copyright (c) 2012, Richard Warren
6 // All rights reserved.
7 //
8 // Redistribution and use in source and binary forms, with or without modification,
9 // are permitted provided that the following conditions are met:
10 //
11 // * Redistributions of source code must retain the above copyright notice, this
12 // list of conditions and the following disclaimer.
13 //
14 // * Redistributions in binary form must reproduce the above copyright notice,
15 // this list of conditions and the following disclaimer in the documentation
16 // and/or other materials provided with the distribution.
17 //
18 // * Neither the name of the <ORGANIZATION> nor the names of its contributors may
19 // be used to endorse or promote products derived from this software without
20 // specific prior written permission.
21 //
22 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
23 // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
24 // OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
25 // SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
26 // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
27 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
28 // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
29 // STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
30 // OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 
58 #import <Foundation/Foundation.h>
59 
65 
74 };
75 
80 
86 typedef void (^FMSPseudoPropertyAdder) (NSString *propertyName);
87 
88 
95 @interface NSObject (FMS_Swizzler)
96 
128 + (void)FMS_aliasInstanceMethod:(SEL)originalSelector newSelector:(SEL)newSelector;
129 
166 + (void)FMS_replaceInstanceMethod:(SEL)methodSelector withImplementationBlock:(id)block;
167 
208 + (void)FMS_overrideInstanceMethod:(SEL)selector oldSelector:(SEL)oldSelector implementationBlock:(id)block;
209 
226 + (void)FMS_aliasClassMethod:(SEL)originalSelector newSelector:(SEL)newSelector;
227 
244 + (void)FMS_replaceClassMethod:(SEL)methodSelector withImplementationBlock:(id)block;
245 
274 + (void)FMS_overrideClassMethod:(SEL)selector oldSelector:(SEL)oldSelector implementationBlock:(id)block;
275 
288 + (FMSPseudoPropertyAdder)FMS_generatePseudoPropertyAdderForType:(FMSPseudoPropertyType)type;
289 
290 
317 - (void)FMS_dynamiclySubclass;
318 
319 @end