1 |
efrain |
1 |
/*
|
|
|
2 |
* Copyright 2018 Google LLC
|
|
|
3 |
*
|
|
|
4 |
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
5 |
* you may not use this file except in compliance with the License.
|
|
|
6 |
* You may obtain a copy of the License at
|
|
|
7 |
*
|
|
|
8 |
* http://www.apache.org/licenses/LICENSE-2.0
|
|
|
9 |
*
|
|
|
10 |
* Unless required by applicable law or agreed to in writing, software
|
|
|
11 |
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
12 |
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
13 |
* See the License for the specific language governing permissions and
|
|
|
14 |
* limitations under the License.
|
|
|
15 |
*/
|
|
|
16 |
|
|
|
17 |
#import <Foundation/Foundation.h>
|
|
|
18 |
|
|
|
19 |
@class GULObjectSwizzler;
|
|
|
20 |
|
|
|
21 |
/** This class exists as a method donor. These methods will be added to all objects that are
|
|
|
22 |
* swizzled by the object swizzler. This class should not be instantiated.
|
|
|
23 |
*/
|
|
|
24 |
@interface GULSwizzledObject : NSObject
|
|
|
25 |
|
|
|
26 |
- (instancetype)init NS_UNAVAILABLE;
|
|
|
27 |
|
|
|
28 |
/** Copies the methods below to the swizzled object.
|
|
|
29 |
*
|
|
|
30 |
* @param objectSwizzler The swizzler to use when adding the methods below.
|
|
|
31 |
*/
|
|
|
32 |
+ (void)copyDonorSelectorsUsingObjectSwizzler:(GULObjectSwizzler *)objectSwizzler;
|
|
|
33 |
|
|
|
34 |
#pragma mark - Donor methods.
|
|
|
35 |
|
|
|
36 |
/** @return The generated subclass. Used in respondsToSelector: calls. */
|
|
|
37 |
- (Class)gul_class;
|
|
|
38 |
|
|
|
39 |
/** @return The object swizzler that manages this object. */
|
|
|
40 |
- (GULObjectSwizzler *)gul_objectSwizzler;
|
|
|
41 |
|
|
|
42 |
@end
|