1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105
|
#pragma clang system_header
#define nil 0
#define BOOL int
#define NS_ASSUME_NONNULL_BEGIN _Pragma("clang assume_nonnull begin")
#define NS_ASSUME_NONNULL_END _Pragma("clang assume_nonnull end")
NS_ASSUME_NONNULL_BEGIN
typedef struct _NSZone NSZone;
typedef unsigned long NSUInteger;
@class NSCoder, NSEnumerator;
@protocol NSObject
+ (instancetype)alloc;
- (instancetype)init;
- (instancetype)autorelease;
@end
@protocol NSCopying
- (id)copyWithZone:(nullable NSZone *)zone;
@end
@protocol NSMutableCopying
- (id)mutableCopyWithZone:(nullable NSZone *)zone;
@end
@protocol NSCoding
- (void)encodeWithCoder:(NSCoder *)aCoder;
@end
@protocol NSSecureCoding <NSCoding>
@required
+ (BOOL)supportsSecureCoding;
@end
typedef struct {
unsigned long state;
id *itemsPtr;
unsigned long *mutationsPtr;
unsigned long extra[5];
} NSFastEnumerationState;
__attribute__((objc_root_class))
@interface
NSObject<NSObject>
@end
@interface NSString : NSObject<NSCopying>
- (BOOL)isEqualToString : (NSString *)aString;
- (NSString *)stringByAppendingString:(NSString *)aString;
- (nullable NSString *)nullableStringByAppendingString:(NSString *)aString;
+ (NSString * _Nonnull) generateString;
+ (NSString *) generateImplicitlyNonnullString;
+ (NSString * _Nullable) generatePossiblyNullString;
@end
void NSSystemFunctionTakingNonnull(NSString *s);
@interface NSSystemClass : NSObject
- (void) takesNonnull:(NSString *)s;
@end
NSString* _Nullable getPossiblyNullString();
NSString* _Nonnull getString();
@protocol MyProtocol
- (NSString * _Nonnull) getString;
@end
NS_ASSUME_NONNULL_END
@interface NSDictionary : NSObject <NSCopying, NSMutableCopying, NSSecureCoding>
- (NSUInteger)count;
- (id)objectForKey:(id)aKey;
- (NSEnumerator *)keyEnumerator;
- (id)objectForKeyedSubscript:(id)aKey;
@end
@interface NSDictionary (NSDictionaryCreation)
+ (id)dictionary;
+ (id)dictionaryWithObject:(id)object forKey:(id <NSCopying>)key;
+ (instancetype)dictionaryWithObjects:(const id [])objects forKeys:(const id <NSCopying> [])keys count:(NSUInteger)cnt;
@end
@interface NSMutableDictionary : NSDictionary
- (void)removeObjectForKey:(id)aKey;
- (void)setObject:(id)anObject forKey:(id <NSCopying>)aKey;
@end
@interface NSMutableDictionary (NSExtendedMutableDictionary)
- (void)addEntriesFromDictionary:(NSDictionary *)otherDictionary;
- (void)removeAllObjects;
- (void)setDictionary:(NSDictionary *)otherDictionary;
- (void)setObject:(id)obj forKeyedSubscript:(id <NSCopying>)key __attribute__((availability(macosx,introduced=10.8)));
@end
|