Skip to content

ClassDescriptor

Azoy edited this page May 6, 2021 · 2 revisions

ClassDescriptor

A class descriptor that descibes some class context.

public struct ClassDescriptor: TypeContextDescriptor, LayoutWrapper 

ABI Stability: Stable since the following

| macOS | iOS/tvOS | watchOS | Linux | Windows |
|-------|----------|---------|-------|---------|
| 10.14 | 12.2     | 5.2     | NA    | NA      |

Inheritance

TypeContextDescriptor, LayoutWrapper

Properties

ptr

Backing context descriptor pointer.

public let ptr: UnsafeRawPointer

superclass

The mangled type name for this class's superclass, if it has one.

public var superclass: UnsafeRawPointer 

negativeSize

The negative size of the metadata objects in this class.

public var negativeSize: Int 

positiveSize

The positive size of the metadata objects in this class.

public var positiveSize: Int 

numMembers

The number of members this class defines. This is both properties and methods.

public var numMembers: Int 

numFields

The number of properties this class declares (not including superclass) properties).

public var numFields: Int 

fieldOffsetVectorOffset

The number of words away the field offset vector is from canonical metadata pointer.

public var fieldOffsetVectorOffset: Int 

resilientSuperclass

A pointer to the resilient superclass. This pointer differs in type depending on what typeFlags.resilientSuperclassRefKind returns.

public var resilientSuperclass: UnsafeRawPointer? 

foreignMetadataInitialization

The foreign metadata initialization info for this class metadata, if it has any.

public var foreignMetadataInitialization: ForeignMetadataInitialization? 

singletonMetadataInitialization

The singleton metadata initialization info for this class metadata, if it has any.

public var singletonMetadataInitialization: SingletonMetadataInitialization? 

vtableHeader

The VTable header information for this class, if it has a vtable.

public var vtableHeader: VTableDescriptorHeader? 

methodDescriptors

An array of all of the method descriptors for this class for the entries in the vtable, if this class has a vtable.

public var methodDescriptors: [MethodDescriptor] 

overrideTableHeader

The override table header indicating how many method overrides there are for this class, if it has an override table.

public var overrideTableHeader: OverrideTableHeader? 

methodOverrideDescriptors

An array of all of the method override descriptors, if this class has an override table.

public var methodOverrideDescriptors: [MethodOverrideDescriptor] 
Types
Protocols
Global Variables
Global Functions
Clone this wiki locally