2016-03-05 09:32:43 +08:00
|
|
|
#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;
|
|
|
|
|
|
|
|
@protocol NSObject
|
2016-03-29 04:30:25 +08:00
|
|
|
+ (instancetype)alloc;
|
|
|
|
- (instancetype)init;
|
|
|
|
- (instancetype)autorelease;
|
2016-03-05 09:32:43 +08:00
|
|
|
@end
|
|
|
|
|
|
|
|
@protocol NSCopying
|
|
|
|
- (id)copyWithZone:(nullable NSZone *)zone;
|
|
|
|
@end
|
|
|
|
|
|
|
|
@protocol NSMutableCopying
|
|
|
|
- (id)mutableCopyWithZone:(nullable NSZone *)zone;
|
|
|
|
@end
|
|
|
|
|
|
|
|
__attribute__((objc_root_class))
|
|
|
|
@interface
|
|
|
|
NSObject<NSObject>
|
|
|
|
@end
|
|
|
|
|
|
|
|
@interface NSString : NSObject<NSCopying>
|
|
|
|
- (BOOL)isEqualToString : (NSString *)aString;
|
|
|
|
- (NSString *)stringByAppendingString:(NSString *)aString;
|
2018-06-13 03:07:41 +08:00
|
|
|
- (nullable NSString *)nullableStringByAppendingString:(NSString *)aString;
|
2018-05-31 08:28:13 +08:00
|
|
|
+ (NSString * _Nonnull) generateString;
|
|
|
|
+ (NSString *) generateImplicitlyNonnullString;
|
|
|
|
+ (NSString * _Nullable) generatePossiblyNullString;
|
2016-03-05 09:32:43 +08:00
|
|
|
@end
|
|
|
|
|
|
|
|
void NSSystemFunctionTakingNonnull(NSString *s);
|
|
|
|
|
|
|
|
@interface NSSystemClass : NSObject
|
|
|
|
- (void) takesNonnull:(NSString *)s;
|
|
|
|
@end
|
|
|
|
|
2018-03-23 08:16:03 +08:00
|
|
|
NSString* _Nullable getPossiblyNullString();
|
|
|
|
NSString* _Nonnull getString();
|
|
|
|
|
|
|
|
@protocol MyProtocol
|
2018-05-31 08:28:13 +08:00
|
|
|
- (NSString * _Nonnull) getString;
|
2018-03-23 08:16:03 +08:00
|
|
|
@end
|
|
|
|
|
2016-03-05 09:32:43 +08:00
|
|
|
NS_ASSUME_NONNULL_END
|