Skip to content

ClassMetadata

Azoy edited this page Mar 17, 2021 · 2 revisions

ClassMetadata

The metadata structure that represents a class type in Swift.

public struct ClassMetadata: TypeMetadata, LayoutWrapper

ABI Stability: Stable since the following

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

Inheritance

LayoutWrapper, TypeMetadata

Properties

ptr

Backing class metadata pointer.

let ptr: UnsafeRawPointer

descriptor

The class context descriptor that describes this class.

var descriptor: ClassDescriptor

isaPointer

The Objective-C ISA pointer, if it has one.

var isaPointer: UnsafeRawPointer?

superclassType

The superclass type that this class inherits from, if it inherits one at all.

var superclassType: Any.Type?

superclassMetadata

The superclass type metadata that this class inherits from, it it inherits one at all.

var superclassMetadata: ClassMetadata?

classAddressPoint

The offset of the address point within the class.

var classAddressPoint: Int

flags

The specific flags that describe this class metadata.

var flags: Flags

classSize

The size of the class including headers and suffixes.

var classSize: Int

isSwiftClass

Whether or not this class was defined in Swift.

var isSwiftClass: Bool

instanceAddressPoint

The address point for instances of this type.

var instanceAddressPoint: Int

instanceSize

The required size of instances of this type.

var instanceSize: Int

instanceAlignmentMask

The alignment mask of the address point for instances of this type.

var instanceAlignmentMask: Int

fieldOffsets

An array of field offsets for this class's stored representation.

var fieldOffsets: [Int]
Types
Protocols
Global Variables
Global Functions
Clone this wiki locally