Skip to content

ClassMetadata

Azoy edited this page May 6, 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

TypeMetadata, LayoutWrapper

Properties

ptr

Backing class metadata pointer.

public let ptr: UnsafeRawPointer

descriptor

The class context descriptor that describes this class.

public var descriptor: ClassDescriptor 

isaPointer

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

public var isaPointer: UnsafeRawPointer? 

superclassType

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

public var superclassType: Any.Type? 

superclassMetadata

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

public var superclassMetadata: ClassMetadata? 

classAddressPoint

The offset of the address point within the class.

public var classAddressPoint: Int 

flags

The specific flags that describe this class metadata.

public var flags: Flags 

classSize

The size of the class including headers and suffixes.

public var classSize: Int 

isSwiftClass

Whether or not this class was defined in Swift.

public var isSwiftClass: Bool 

instanceAddressPoint

The address point for instances of this type.

public var instanceAddressPoint: Int 

instanceSize

The required size of instances of this type.

public var instanceSize: Int 

instanceAlignmentMask

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

public var instanceAlignmentMask: Int 

fieldOffsets

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

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