| Anna Zaks | 63282ae | 2012-07-30 20:31:29 +0000 | [diff] [blame] | 1 | |
| 2 | // Define a public header for the ObjC methods that are "visible" externally |
| 3 | // and, thus, could be sub-classed. We should explore the path on which these |
| 4 | // are sub-classed with unknown class by not inlining them. |
| 5 | |
| 6 | typedef signed char BOOL; |
| 7 | typedef struct objc_class *Class; |
| 8 | typedef struct objc_object { |
| 9 | Class isa; |
| 10 | } *id; |
| 11 | @protocol NSObject - (BOOL)isEqual:(id)object; @end |
| 12 | @interface NSObject <NSObject> {} |
| 13 | +(id)alloc; |
| Anna Zaks | 75f49a9 | 2012-08-10 18:55:58 +0000 | [diff] [blame] | 14 | +(id)new; |
| Anna Zaks | 63282ae | 2012-07-30 20:31:29 +0000 | [diff] [blame] | 15 | -(id)init; |
| 16 | -(id)autorelease; |
| 17 | -(id)copy; |
| 18 | - (Class)class; |
| 19 | -(id)retain; |
| 20 | @end |
| Anna Zaks | 920af01 | 2012-08-10 18:55:53 +0000 | [diff] [blame] | 21 | |
| Anna Zaks | d4e6537 | 2012-08-10 18:56:01 +0000 | [diff] [blame] | 22 | @interface PublicClass : NSObject { |
| 23 | int value3; |
| 24 | } |
| Anna Zaks | 920af01 | 2012-08-10 18:55:53 +0000 | [diff] [blame] | 25 | - (int)getZeroPublic; |
| Anna Zaks | d4e6537 | 2012-08-10 18:56:01 +0000 | [diff] [blame] | 26 | |
| 27 | - (int) value2; |
| 28 | |
| 29 | @property (readonly) int value1; |
| 30 | |
| 31 | @property int value3; |
| 32 | - (int)value3; |
| 33 | - (void)setValue3:(int)newValue; |
| Anna Zaks | 920af01 | 2012-08-10 18:55:53 +0000 | [diff] [blame] | 34 | @end |
| 35 | |
| 36 | @interface PublicSubClass : PublicClass |
| 37 | @end |
| Anna Zaks | 75f49a9 | 2012-08-10 18:55:58 +0000 | [diff] [blame] | 38 | |
| 39 | @interface PublicParent : NSObject |
| 40 | - (int)getZeroOverridden; |
| 41 | @end |
| 42 | |
| 43 | @interface PublicSubClass2 : PublicParent |
| 44 | - (int) getZeroOverridden; |
| 45 | @end |
| 46 | |