-
Notifications
You must be signed in to change notification settings - Fork 0
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 |
Backing class metadata pointer.
public let ptr: UnsafeRawPointerThe class context descriptor that describes this class.
public var descriptor: ClassDescriptor? The Objective-C ISA pointer, if it has one.
public var isaPointer: UnsafeRawPointer? The superclass type that this class inherits from, if it inherits one at all.
public var superclassType: Any.Type? The superclass type metadata that this class inherits from, it it inherits one at all.
public var superclassMetadata: ClassMetadata? The offset of the address point within the class.
public var classAddressPoint: Int The specific flags that describe this class metadata.
public var flags: Flags The size of the class including headers and suffixes.
public var classSize: Int Whether or not this class was defined in Swift.
public var isSwiftClass: Bool The address point for instances of this type.
public var instanceAddressPoint: Int The required size of instances of this type.
public var instanceSize: Int The alignment mask of the address point for instances of this type.
public var instanceAlignmentMask: Int An array of field offsets for this class's stored representation.
public var fieldOffsets: [Int] Generated at 2026-07-27T11:49:06+0000 using swift-doc 1.0.0-rc.1.
Types
- AccessibleFunction
- AccessibleFunctionFlags
- AnonymousDescriptor
- AnonymousDescriptor.Flags
- AnyExistentialContainer
- AsyncContinuationFlags
- BoxPair
- ClassDescriptor
- ClassMetadata
- ClassMetadata.Flags
- ConformanceDescriptor
- ConformanceDescriptor.Flags
- ContextDescriptorFlags
- ContextDescriptorKind
- ContinuationStatus
- CoroutineAllocator
- CoroutineAllocatorFlags
- CoroutineAllocatorKind
- DefaultOverrideTableHeader
- DualExistentialContainer
- DynamicCastFlags
- DynamicReplacementChainEntry
- DynamicReplacementDescriptor
- DynamicReplacementKey
- DynamicReplacementScope
- EnumDescriptor
- EnumMetadata
- EnumValueWitnessTable
- ExistentialContainer
- ExistentialMetadata
- ExistentialMetadata.Flags
- ExistentialProtocolReference
- ExistentialProtocolReference.Kind
- ExtendedExistentialMetadata
- ExtendedExistentialTypeShape
- ExtendedExistentialTypeShape.Flags
- ExtendedExistentialTypeShape.SpecialKind
- ExtendedFunctionTypeFlags
- ExtensionDescriptor
- ExtraClassDescriptorFlags
- FieldDescriptor
- FieldDescriptor.Kind
- FieldRecord
- FieldRecord.Flags
- FixedArrayMetadata
- ForeignClassMetadata
- ForeignMetadataInitialization
- ForeignReferenceTypeMetadata
- FunctionConvention
- FunctionMetadata
- FunctionMetadata.DifferentiabilityKind
- FunctionMetadata.Flags
- FunctionMetadata.ParamFlags
- GenericArgument
- GenericClassMetadataPattern
- GenericContext
- GenericContextDescriptorFlags
- GenericEnvironment
- GenericEnvironmentFlags
- GenericMetadataPartialPattern
- GenericMetadataPattern
- GenericMetadataPattern.Flags
- GenericPackKind
- GenericPackShapeDescriptor
- GenericPackShapeHeader
- GenericParameterDescriptor
- GenericParameterKind
- GenericRequirementDescriptor
- GenericRequirementDescriptor.Flags
- GenericRequirementKind
- GenericRequirementLayoutKind
- GenericSignatureHeader
- GenericValueDescriptor
- GenericValueHeader
- GenericValueMetadataPattern
- GenericValueType
- GenericWitnessTable
- GlobalActorReference
- HeapGenericLocalVariableMetadata
- HeapLocalVariableMetadata
- HeapObject
- InvertibleProtocolKind
- InvertibleProtocolSet
- JobFlags
- JobKind
- JobPriority
- KeyPathComponentHeader
- KeyPathComponentHeader.ComputedIdentifierKind
- KeyPathComponentHeader.ComputedIdentifierResolution
- KeyPathComponentHeader.ComputedPropertyKind
- KeyPathComponentHeader.Kind
- KeyPathComponentHeader.OptionalOperation
- KeyPathComponentHeader.StoredOffsetKind
- KnownMetadata
- KnownMetadata.Builtin
- MetadataAccessFunction
- MetadataBounds
- MetadataInitializationKind
- MetadataKind
- MetadataPack
- MetadataRequest
- MetadataResponse
- MetadataState
- MetadataTrailingFlags
- MetatypeMetadata
- MethodDefaultOverrideDescriptor
- MethodDescriptor
- MethodDescriptor.Flags
- MethodDescriptor.Kind
- MethodOverrideDescriptor
- ModuleDescriptor
- NonUniqueExtendedExistentialTypeShape
- ObjCClassWrapperMetadata
- OpaqueDescriptor
- OpaqueMetadata
- OpaqueTypeReplacement
- OverrideTableHeader
- PackLifetime
- ProtocolDescriptor
- ProtocolDescriptor.Flags
- ProtocolDispatchStrategy
- ProtocolRequirement
- ProtocolRequirement.Flags
- ProtocolRequirement.Kind
- ReferenceStorageKind
- RelativeWitnessTable
- ResilientClassMetadataPattern
- ResilientWitness
- SerialExecutorReference
- SerialExecutorReference.Kind
- SingletonMetadataInitialization
- SpecialProtocol
- StructDescriptor
- StructMetadata
- TaskCreateFlags
- TaskExecutorReference
- TaskExecutorReference.Kind
- TaskGroupFlags
- TaskOptionRecordFlags
- TaskOptionRecordKind
- TaskStatusRecordFlags
- TaskStatusRecordKind
- TupleMetadata
- TupleMetadata.Element
- TypeContextDescriptorFlags
- TypeGenericContext
- TypeImportInfo
- TypeReferenceKind
- UnknownMetadata
- VTableDescriptorHeader
- ValueOwnership
- ValueWitnessTable
- ValueWitnessTable.Flags
- WitnessTable
- WitnessTablePack
Global Typealiases
Global Variables
Global Functions
- container(for:)
- findConformance(to:)
- findConformance(toProtocolNamed:)
- lookupSection(_:segment:section:do:)
- reflect(_:)
- reflectClass(_:)
- reflectEnum(_:)
- reflectStruct(_:)
- registerAccessibleFunctions(section:size:)
- registerDynamicReplacementScopes(section:size:)
- registerOpaqueTypeReplacements(section:size:)
- registerProtocolConformances(section:size:)
- registerProtocols(section:size:)
- registerTypeMetadata(section:size:)
- swift_allocBox(for:)
- swift_allocObject(for:size:alignment:)
- swift_conformsToProtocol(metadata:protocol:)
- swift_conformsToProtocol(type:protocol:)
- swift_getTypeName(for:qualified:)
- withProjectedValue(of:_:)
- withProjectedValues(of:_:)