Skip to content

ObjCClassWrapperMetadata

Azoy edited this page May 6, 2021 · 2 revisions

ObjCClassWrapperMetadata

The metadata structure that represents an Objective-C class that wasn't Swift compiled.

public struct ObjCClassWrapperMetadata: Metadata, LayoutWrapper 

ABI Stability: Stable since the following

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

Inheritance

Metadata, LayoutWrapper

Properties

ptr

Backing Objective-C class wrapper metadata pointer.

public let ptr: UnsafeRawPointer

classType

The class type that this wrapper houses.

public var classType: Any.Type 

classMetadata

The class metadata.

public var classMetadata: ClassMetadata 

conformances

The list of conformances defined for this type metadata.

public var conformances: [ConformanceDescriptor] 

NOTE: This list is populated once before the program starts with all of the conformances that are statically know at compile time. If you are attempting to load libraries dynamically at runtime, this list will update automatically, so make sure if you need up to date information on a type's conformances, fetch this often. Example:

  let metadata = ...
  var conformances = metadata.conformances
  loadPlugin(...)
  // conformances is now outdated! Refresh it by calling this again.
  conformances = metadata.conformances
Types
Protocols
Global Variables
Global Functions
Clone this wiki locally