2 Copyright (c) 1994-2012, Apple Inc. All rights reserved.
5 #ifndef _OBJC_NSOBJECT_H_
6 #define _OBJC_NSOBJECT_H_
10 #include <objc/objc.h>
11 #include <objc/NSObjCRuntime.h>
13 @
class NSString
, NSMethodSignature
, NSInvocation
;
17 - (BOOL
)isEqual
:(id
)object
;
18 @
property (readonly
) NSUInteger hash
;
20 @
property (readonly
) Class superclass
;
21 - (Class
)class OBJC_SWIFT_UNAVAILABLE("use 'type(of: anObject)' instead");
24 - (id
)performSelector
:(SEL
)aSelector
;
25 - (id
)performSelector
:(SEL
)aSelector withObject
:(id
)object
;
26 - (id
)performSelector
:(SEL
)aSelector withObject
:(id
)object1 withObject
:(id
)object2
;
30 - (BOOL
)isKindOfClass
:(Class
)aClass
;
31 - (BOOL
)isMemberOfClass
:(Class
)aClass
;
32 - (BOOL
)conformsToProtocol
:(Protocol
*)aProtocol
;
34 - (BOOL
)respondsToSelector
:(SEL
)aSelector
;
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
;
41 - (struct _NSZone
*)zone OBJC_ARC_UNAVAILABLE
;
43 @
property (readonly
, copy
) NSString
*description
;
45 @
property (readonly
, copy
) NSString
*debugDescription
;
50 OBJC_AVAILABLE(10.0, 2.0, 9.0, 1.0, 2.0)
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
64 #if NS_ENFORCE_NSOBJECT_DESIGNATED_INITIALIZER
65 NS_DESIGNATED_INITIALIZER
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");
74 - (void)finalize
OBJC_DEPRECATED("Objective-C garbage collection is no longer supported");
79 + (id
)copyWithZone
:(struct _NSZone
*)zone OBJC_ARC_UNAVAILABLE
;
80 + (id
)mutableCopyWithZone
:(struct _NSZone
*)zone OBJC_ARC_UNAVAILABLE
;
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
;
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("");
92 + (NSMethodSignature
*)instanceMethodSignatureForSelector
:(SEL
)aSelector
OBJC_SWIFT_UNAVAILABLE("");
94 - (BOOL
)allowsWeakReference UNAVAILABLE_ATTRIBUTE
;
95 - (BOOL
)retainWeakReference UNAVAILABLE_ATTRIBUTE
;
97 + (BOOL
)isSubclassOfClass
:(Class
)aClass
;
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);
104 + (Class
)class OBJC_SWIFT_UNAVAILABLE("use 'aClass.self' instead");
105 + (NSString
*)description
;
106 + (NSString
*)debugDescription
;