The root class of all Objective-C classes. More...
#import <objc/objc.h>
Instance Methods | |
(void) | - dealloc |
Free resources for an existing instance. | |
(id) | - init |
Initialize the instance, after allocation. More... | |
(Class) | - class |
Returns the class of the instance. More... | |
(Class) | - superclass |
Returns the superclass of the instance. More... | |
(BOOL) | - isEqual: |
Compares the receiver to another object for equality. More... | |
(BOOL) | - isKindOfClass: |
Returns a Boolean value that indicates whether the receiver is an instance of a given class. More... | |
(BOOL) | - conformsTo: |
Checks if the receiver's class conforms to a protocol. More... | |
(NXString *) | - description |
Returns a string that represents the instance. More... | |
![]() | |
(BOOL) | - respondsToSelector: |
Checks if the receiver responds to a selector. More... | |
Class Methods | |
(void) | + initialize |
Performs one-time initialization for the class. More... | |
(id) | + alloc |
Allocate a new class instance. More... | |
(Class) | + class |
Returns the class object. More... | |
(Class) | + superclass |
Returns the superclass of the class. More... | |
(const char *) | + name |
Returns the name of the class. More... | |
(BOOL) | + conformsTo: |
Checks if the class conforms to a protocol. More... | |
(NXString *) | + description |
Returns a string that represents the class. More... | |
Protected Attributes | |
Class | isa |
A pointer to the object's class structure. More... | |
The root class of all Objective-C classes.
This class is the base class for all objects in Objective-C. It provides basic memory management and introspection capabilities.
+ (id) alloc |
Allocate a new class instance.
- (Class) class |
Returns the class of the instance.
+ (Class) class |
Returns the class object.
Checks if the class conforms to a protocol.
aProtocolObject | The protocol to check conformance against. |
This class method determines whether the receiving class adopts or inherits from the specified protocol. A class conforms to a protocol if it explicitly declares that it adopts the protocol, or if it inherits from a class that conforms to the protocol.
Reimplemented from <ObjectProtocol>.
Implemented in Protocol.
Checks if the receiver's class conforms to a protocol.
aProtocolObject | The protocol to check conformance against. |
This instance method determines whether the receiving object's class adopts or inherits from the specified protocol. This is equivalent to calling the class method on the receiver's class.
Reimplemented from <ObjectProtocol>.
Implemented in Protocol.
+ (NXString *) description |
Returns a string that represents the class.
Provided by category Object(Description).
- (NXString *) description |
Returns a string that represents the instance.
Provided by category Object(Description).
- (id) init |
Initialize the instance, after allocation.
Subclasses should override this method to perform custom initialization, and free resources if the initialization fails.
+ (void) initialize |
Performs one-time initialization for the class.
This method is called automatically by the Objective-C runtime before the class receives messages.
Subclasses may override this method to perform initialization tasks like setting up class variables or initializing static data structures. If subclasses implement this method, they are called first, and may be called multiple times.
Compares the receiver to another object for equality.
anObject | The object to compare with the receiver. |
When comparing two objects, this method should be overridden to compare the contents of the objects.
Reimplemented from <ObjectProtocol>.
Returns a Boolean value that indicates whether the receiver is an instance of a given class.
cls | A class object. |
Reimplemented from <ObjectProtocol>.
+ (const char *) name |
Returns the name of the class.
Reimplemented from <ObjectProtocol>.
Implemented in Protocol.
- (Class) superclass |
Returns the superclass of the instance.
+ (Class) superclass |
Returns the superclass of the class.
|
protected |