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)
53 @interface NSObject
<NSObject
> {
54 Class isa OBJC_ISA_AVAILABILITY
;
61 #if NS_ENFORCE_NSOBJECT_DESIGNATED_INITIALIZER
62 NS_DESIGNATED_INITIALIZER
66 + (instancetype
)new OBJC_SWIFT_UNAVAILABLE("use object initializers instead");
67 + (instancetype
)allocWithZone
:(struct _NSZone
*)zone
OBJC_SWIFT_UNAVAILABLE("use object initializers instead");
68 + (instancetype
)alloc
OBJC_SWIFT_UNAVAILABLE("use object initializers instead");
69 - (void)dealloc
OBJC_SWIFT_UNAVAILABLE("use 'deinit' to define a de-initializer");
71 - (void)finalize
OBJC_DEPRECATED("Objective-C garbage collection is no longer supported");
76 + (id
)copyWithZone
:(struct _NSZone
*)zone OBJC_ARC_UNAVAILABLE
;
77 + (id
)mutableCopyWithZone
:(struct _NSZone
*)zone OBJC_ARC_UNAVAILABLE
;
79 + (BOOL
)instancesRespondToSelector
:(SEL
)aSelector
;
80 + (BOOL
)conformsToProtocol
:(Protocol
*)protocol
;
81 - (IMP
)methodForSelector
:(SEL
)aSelector
;
82 + (IMP
)instanceMethodForSelector
:(SEL
)aSelector
;
83 - (void)doesNotRecognizeSelector
:(SEL
)aSelector
;
85 - (id
)forwardingTargetForSelector
:(SEL
)aSelector
OBJC_AVAILABLE(10.5, 2.0, 9.0, 1.0);
86 - (void)forwardInvocation
:(NSInvocation
*)anInvocation
OBJC_SWIFT_UNAVAILABLE("");
87 - (NSMethodSignature
*)methodSignatureForSelector
:(SEL
)aSelector
OBJC_SWIFT_UNAVAILABLE("");
89 + (NSMethodSignature
*)instanceMethodSignatureForSelector
:(SEL
)aSelector
OBJC_SWIFT_UNAVAILABLE("");
91 - (BOOL
)allowsWeakReference UNAVAILABLE_ATTRIBUTE
;
92 - (BOOL
)retainWeakReference UNAVAILABLE_ATTRIBUTE
;
94 + (BOOL
)isSubclassOfClass
:(Class
)aClass
;
96 + (BOOL
)resolveClassMethod
:(SEL
)sel
OBJC_AVAILABLE(10.5, 2.0, 9.0, 1.0);
97 + (BOOL
)resolveInstanceMethod
:(SEL
)sel
OBJC_AVAILABLE(10.5, 2.0, 9.0, 1.0);
101 + (Class
)class OBJC_SWIFT_UNAVAILABLE("use 'aClass.self' instead");
102 + (NSString
*)description
;
103 + (NSString
*)debugDescription
;