1 /*	NSObject.h
2 	Copyright (c) 1994-2012, Apple Inc. All rights reserved.
3 */
4 
5 #ifndef _OBJC_NSOBJECT_H_
6 #define _OBJC_NSOBJECT_H_
7 
8 #if __OBJC__
9 
10 #include <objc/objc.h>
11 #include <objc/NSObjCRuntime.h>
12 
13 @class NSString, NSMethodSignature, NSInvocation;
14 
15 @protocol NSObject
16 
17 - (BOOL)isEqual:(id)object;
18 @property (readonly) NSUInteger hash;
19 
20 @property (readonly) Class superclass;
21 - (Class)class OBJC_SWIFT_UNAVAILABLE("use 'type(of: anObject)' instead");
22 - (instancetype)self;
23 
24 - (id)performSelector:(SEL)aSelector;
25 - (id)performSelector:(SEL)aSelector withObject:(id)object;
26 - (id)performSelector:(SEL)aSelector withObject:(id)object1 withObject:(id)object2;
27 
28 - (BOOL)isProxy;
29 
30 - (BOOL)isKindOfClass:(Class)aClass;
31 - (BOOL)isMemberOfClass:(Class)aClass;
32 - (BOOL)conformsToProtocol:(Protocol *)aProtocol;
33 
34 - (BOOL)respondsToSelector:(SEL)aSelector;
35 
36 - (instancetype)retain OBJC_ARC_UNAVAILABLE;
37 - (oneway void)release OBJC_ARC_UNAVAILABLE;
38 - (instancetype)autorelease OBJC_ARC_UNAVAILABLE;
39 - (NSUInteger)retainCount OBJC_ARC_UNAVAILABLE;
40 
41 - (struct _NSZone *)zone OBJC_ARC_UNAVAILABLE;
42 
property(readonly,copy)43 @property (readonly, copy) NSString *description;
44 @optional
45 @property (readonly, copy) NSString *debugDescription;
46 
47 @end
48 
49 
50 OBJC_AVAILABLE(10.0, 2.0, 9.0, 1.0, 2.0)
51 OBJC_ROOT_CLASS
52 OBJC_EXPORT
53 @interface NSObject <NSObject> {
54 #pragma clang diagnostic push
55 #pragma clang diagnostic ignored "-Wobjc-interface-ivars"
56     Class isa  OBJC_ISA_AVAILABILITY;
57 #pragma clang diagnostic pop
58 }
59 
60 + (void)load;
61 
62 + (void)initialize;
63 - (instancetype)init
64 #if NS_ENFORCE_NSOBJECT_DESIGNATED_INITIALIZER
65     NS_DESIGNATED_INITIALIZER
66 #endif
67     ;
68 
69 + (instancetype)new OBJC_SWIFT_UNAVAILABLE("use object initializers instead");
70 + (instancetype)allocWithZone:(struct _NSZone *)zone OBJC_SWIFT_UNAVAILABLE("use object initializers instead");
71 + (instancetype)alloc OBJC_SWIFT_UNAVAILABLE("use object initializers instead");
72 - (void)dealloc OBJC_SWIFT_UNAVAILABLE("use 'deinit' to define a de-initializer");
73 
74 - (void)finalize OBJC_DEPRECATED("Objective-C garbage collection is no longer supported");
75 
76 - (id)copy;
77 - (id)mutableCopy;
78 
79 + (id)copyWithZone:(struct _NSZone *)zone OBJC_ARC_UNAVAILABLE;
80 + (id)mutableCopyWithZone:(struct _NSZone *)zone OBJC_ARC_UNAVAILABLE;
81 
82 + (BOOL)instancesRespondToSelector:(SEL)aSelector;
83 + (BOOL)conformsToProtocol:(Protocol *)protocol;
84 - (IMP)methodForSelector:(SEL)aSelector;
85 + (IMP)instanceMethodForSelector:(SEL)aSelector;
86 - (void)doesNotRecognizeSelector:(SEL)aSelector;
87 
88 - (id)forwardingTargetForSelector:(SEL)aSelector OBJC_AVAILABLE(10.5, 2.0, 9.0, 1.0, 2.0);
89 - (void)forwardInvocation:(NSInvocation *)anInvocation OBJC_SWIFT_UNAVAILABLE("");
90 - (NSMethodSignature *)methodSignatureForSelector:(SEL)aSelector OBJC_SWIFT_UNAVAILABLE("");
91 
92 + (NSMethodSignature *)instanceMethodSignatureForSelector:(SEL)aSelector OBJC_SWIFT_UNAVAILABLE("");
93 
94 - (BOOL)allowsWeakReference UNAVAILABLE_ATTRIBUTE;
95 - (BOOL)retainWeakReference UNAVAILABLE_ATTRIBUTE;
96 
97 + (BOOL)isSubclassOfClass:(Class)aClass;
98 
99 + (BOOL)resolveClassMethod:(SEL)sel OBJC_AVAILABLE(10.5, 2.0, 9.0, 1.0, 2.0);
100 + (BOOL)resolveInstanceMethod:(SEL)sel OBJC_AVAILABLE(10.5, 2.0, 9.0, 1.0, 2.0);
101 
102 + (NSUInteger)hash;
103 + (Class)superclass;
104 + (Class)class OBJC_SWIFT_UNAVAILABLE("use 'aClass.self' instead");
105 + (NSString *)description;
106 + (NSString *)debugDescription;
107 
108 @end
109 
110 #endif
111 
112 #endif