类的结构
typedef struct objc_class *Class;
// OBJC2 以前
struct objc_class {
Class isa;
#if !__OBJC2__
Class super_class;
const char *name;
long version;
long info;
long instance_size;
struct objc_ivar_list *ivars;
struct objc_method_list **methodLists;
struct objc_cache *cache;
struct objc_protocol_list *protocols;
#endif
}OBJC2_UNAVAILABLE;
// 之后
struct objc_class : objc_object {
// Class ISA;
Class superclass;
cache_t cache;
class_data_bits_t bits;
class_rw_t *data();
void setData(class_rw_t *newData);
void setInfo(uint32_t set);
void clearInfo(uint32_t clear);
// set and clear must not overlap
void changeInfo(uint32_t set, uint32_t clear);
bool hasCustomRR();
void setHasDefaultRR();
void setHasCustomRR(bool inherited = false);
void printCustomRR(bool inherited);
bool hasCustomAWZ();
void setHasDefaultAWZ();
void setHasCustomAWZ(bool inherited = false);
void printCustomAWZ(bool inherited);
bool requiresRawIsa();
void setRequiresRawIsa(bool inherited = false);
void printRequiresRawIsa(bool inherited);
bool canAllocIndexed();
bool canAllocFast();
bool hasCxxCtor();
void setHasCxxCtor();
bool hasCxxDtor();
void setHasCxxDtor();
bool isSwift()
#if SUPPORT_NONPOINTER_ISA
// Tracked in non-pointer isas; not tracked otherwise
#else
bool instancesHaveAssociatedObjects();
void setInstancesHaveAssociatedObjects();
#endif
bool shouldGrowCache();
void setShouldGrowCache(bool);
bool shouldFinalizeOnMainThread();
void setShouldFinalizeOnMainThread()
bool isInitializing();
void setInitializing();
bool isInitialized();
void setInitialized();
bool isLoadable();
IMP getLoadMethod();
// Locking: To prevent concurrent realization,