Type

Overview

Reflection class for type info

Location

 

constructor    (declared in Object)

Default constructor.

 

constructor

 

Type()

 

init()

 

Type()

AllTypes

Gets access to all types loaded/compiled in.

 

class property AllTypes: IEnumerable<Type> read;

 

class IEnumerable<Type> AllTypes { get; }

 

static var AllTypes: IEnumerable<Type> { get{} }

 

class IEnumerable<Type> AllTypes { __get; }

Attributes

Custom attributes defined on this type

 

property Attributes: IEnumerable<CustomAttribute> read;

 

IEnumerable<CustomAttribute> Attributes { get; }

 

var Attributes: IEnumerable<CustomAttribute> { get{} }

 

IEnumerable<CustomAttribute> Attributes { __get; }

BaseType

Parent type for this type.

 

property BaseType: Type read;

 

Type BaseType { get; }

 

var BaseType: Type { get{} }

 

Type BaseType { __get; }

BoxedDataOffset

For value types, the offset the data starts at; including alignment

 

property BoxedDataOffset: Int32 read;

 

Int32 BoxedDataOffset { get; }

 

var BoxedDataOffset: Int32 { get{} }

 

Int32 BoxedDataOffset { __get; }

Code

Type code; for core types

 

property Code: TypeCodes read;

 

TypeCodes Code { get; }

 

var Code: TypeCodes { get{} }

 

TypeCodes Code { __get; }

COMGuids

Returns a sequence of 0 or more guids attached to this type.

 

property COMGuids: IEnumerable<Guid> read;

 

IEnumerable<Guid> COMGuids { get; }

 

var COMGuids: IEnumerable<Guid> { get{} }

 

IEnumerable<Guid> COMGuids { __get; }

Constants

Returns a sequence of constants in this type

 

property Constants: IEnumerable<ConstantInfo> read;

 

IEnumerable<ConstantInfo> Constants { get; }

 

var Constants: IEnumerable<ConstantInfo> { get{} }

 

IEnumerable<ConstantInfo> Constants { __get; }

DefFlags

Flags for this type

 

property DefFlags: TypeDefFlags read;

 

TypeDefFlags DefFlags { get; }

 

var DefFlags: TypeDefFlags { get{} }

 

TypeDefFlags DefFlags { __get; }

Equals  override virtual

Returns true if the target object matches this one, by default compares the reference.

 

method Equals(other: Object): Boolean

 

Boolean Equals(Object other)

 

func Equals(_ other: Object) -> Boolean

 

Boolean Equals(Object other)

Parameters:

  • other: the reference to compare this with.

Events

Returns a sequence of events on this type

 

property Events: IEnumerable<EventInfo> read;

 

IEnumerable<EventInfo> Events { get; }

 

var Events: IEnumerable<EventInfo> { get{} }

 

IEnumerable<EventInfo> Events { __get; }

Fields

Returns a sequence of fields in this type

 

property Fields: IEnumerable<FieldInfo> read;

 

IEnumerable<FieldInfo> Fields { get; }

 

var Fields: IEnumerable<FieldInfo> { get{} }

 

IEnumerable<FieldInfo> Fields { __get; }

Finalize  protected virtual    (declared in Object)

Finalizer implementation. If not overriden it's not called at all, the runtime checks if there is an override before calling a finalizer.

 

method Finalize

 

void Finalize()

 

func Finalize()

 

void Finalize()

Flags

Flags defined on this type

 

property Flags: IslandTypeFlags read;

 

IslandTypeFlags Flags { get; }

 

var Flags: IslandTypeFlags { get{} }

 

IslandTypeFlags Flags { __get; }

GenericArguments

Returns a sequence of generic arguments.

 

property GenericArguments: IEnumerable<Type> read;

 

IEnumerable<Type> GenericArguments { get; }

 

var GenericArguments: IEnumerable<Type> { get{} }

 

IEnumerable<Type> GenericArguments { __get; }

GetHashCode  override virtual

Returns a hashcode for this object. Overriden implementations should make sure that the number returned here is constant given the same object.

 

method GetHashCode: Int32

 

Int32 GetHashCode()

 

func GetHashCode() -> Int32

 

Int32 GetHashCode()

GetType    (declared in Object)

Returns the actual type of this class

 

method GetType: Type

 

Type GetType()

 

func GetType() -> Type

 

Type GetType()

Instantiate

Instantiates this class by calling the default constructor; only works if there is a constructor with no parameters.

 

method Instantiate: Object

 

Object Instantiate()

 

func Instantiate() -> Object

 

Object Instantiate()

Instantiate<T>

Instantiate with a specific lifetime management provider.

 

method Instantiate<T>: Object

 

Object Instantiate<T>()

 

func Instantiate<T>() -> Object

 

Object Instantiate<T>()

Interfaces

Returns a sequence of interfaces this type implements

 

property Interfaces: IEnumerable<Type> read;

 

IEnumerable<Type> Interfaces { get; }

 

var Interfaces: IEnumerable<Type> { get{} }

 

IEnumerable<Type> Interfaces { __get; }

IsAssignableFrom

Returns true if this type is assignable from another type

 

method IsAssignableFrom(aOrg: Type): Boolean

 

Boolean IsAssignableFrom(Type aOrg)

 

func IsAssignableFrom(_ aOrg: Type) -> Boolean

 

Boolean IsAssignableFrom(Type aOrg)

Parameters:

  • aOrg:

IsCocoaClass Android, iOS, iOS Simulator, macOS, tvOS, tvOS Simulator, Ubuntu, UIKit for Mac, watchOS Simulator, watchOS-arm64_32, watchOS-armv7k, WebAssembly, Windows

True if this type is a cocoa class

 

property IsCocoaClass: Boolean read;

 

Boolean IsCocoaClass { get; }

 

var IsCocoaClass: Boolean { get{} }

 

Boolean IsCocoaClass { __get; }

IsComInterface Android, iOS, iOS Simulator, macOS, tvOS, tvOS Simulator, Ubuntu, UIKit for Mac, watchOS Simulator, watchOS-arm64_32, watchOS-armv7k, WebAssembly, Windows

True if this type is a COM interface

 

property IsComInterface: Boolean read;

 

Boolean IsComInterface { get; }

 

var IsComInterface: Boolean { get{} }

 

Boolean IsComInterface { __get; }

IsDelegate

True if this type is a delegate or function pointer

 

property IsDelegate: Boolean read;

 

Boolean IsDelegate { get; }

 

var IsDelegate: Boolean { get{} }

 

Boolean IsDelegate { __get; }

IsEnum

True if this type is an enum

 

property IsEnum: Boolean read;

 

Boolean IsEnum { get; }

 

var IsEnum: Boolean { get{} }

 

Boolean IsEnum { __get; }

IsFloat

True if this type is a Single or Double.

 

property IsFloat: Boolean read;

 

Boolean IsFloat { get; }

 

var IsFloat: Boolean { get{} }

 

Boolean IsFloat { __get; }

IsInteger

True if this type is an integer type.

 

property IsInteger: Boolean read;

 

Boolean IsInteger { get; }

 

var IsInteger: Boolean { get{} }

 

Boolean IsInteger { __get; }

IsIntegerOrFloat

True if this type is an integer or floating point type.

 

property IsIntegerOrFloat: Boolean read;

 

Boolean IsIntegerOrFloat { get; }

 

var IsIntegerOrFloat: Boolean { get{} }

 

Boolean IsIntegerOrFloat { __get; }

IsSigned

Use this to check if an integer type is signed or not (unsigned)

 

property IsSigned: Boolean read;

 

Boolean IsSigned { get; }

 

var IsSigned: Boolean { get{} }

 

Boolean IsSigned { __get; }

IsSubclassOf

Checks if a type is a subclass of another type.

 

method IsSubclassOf(aType: Type): Boolean

 

Boolean IsSubclassOf(Type aType)

 

func IsSubclassOf(_ aType: Type) -> Boolean

 

Boolean IsSubclassOf(Type aType)

Parameters:

  • aType: The type to compare against

IsSwiftClass Android, iOS, iOS Simulator, macOS, tvOS, tvOS Simulator, Ubuntu, UIKit for Mac, watchOS Simulator, watchOS-arm64_32, watchOS-armv7k, WebAssembly, Windows

True if this class is a swift class

 

property IsSwiftClass: Boolean read;

 

Boolean IsSwiftClass { get; }

 

var IsSwiftClass: Boolean { get{} }

 

Boolean IsSwiftClass { __get; }

IsValueType

Returns true if this type is a valuetype

 

property IsValueType: Boolean read;

 

Boolean IsValueType { get; }

 

var IsValueType: Boolean { get{} }

 

Boolean IsValueType { __get; }

Members

Gets all members defined in this type

 

property Members: IEnumerable<MemberInfo> read;

 

IEnumerable<MemberInfo> Members { get; }

 

var Members: IEnumerable<MemberInfo> { get{} }

 

IEnumerable<MemberInfo> Members { __get; }

Methods

Returns a sequence of all members in this type

 

property Methods: IEnumerable<MethodInfo> read;

 

IEnumerable<MethodInfo> Methods { get; }

 

var Methods: IEnumerable<MethodInfo> { get{} }

 

IEnumerable<MethodInfo> Methods { __get; }

Name

Returns the full type name of this type

 

property Name: String read;

 

String Name { get; }

 

var Name: String { get{} }

 

String Name { __get; }

NestedTypes

Returns all types nested in this type

 

property NestedTypes: IEnumerable<Type> read;

 

IEnumerable<Type> NestedTypes { get; }

 

var NestedTypes: IEnumerable<Type> { get{} }

 

IEnumerable<Type> NestedTypes { __get; }

ObjectModel Android, iOS, iOS Simulator, macOS, tvOS, tvOS Simulator, Ubuntu, UIKit for Mac, watchOS Simulator, watchOS-arm64_32, watchOS-armv7k, WebAssembly, Windows

Returns the object model of this type.

 

property ObjectModel: ObjectModel read;

 

ObjectModel ObjectModel { get; }

 

var ObjectModel: ObjectModel { get{} }

 

ObjectModel ObjectModel { __get; }

Properties

Returns a sequence of properties in this class.

 

property Properties: IEnumerable<PropertyInfo> read;

 

IEnumerable<PropertyInfo> Properties { get; }

 

var Properties: IEnumerable<PropertyInfo> { get{} }

 

IEnumerable<PropertyInfo> Properties { __get; }

ReferenceEquals    (declared in Object)

Compares two references for equivalence (even if they have an equals operator)

 

class method ReferenceEquals(a: Object; b: Object): Boolean

 

static Boolean ReferenceEquals(Object a, Object b)

 

static func ReferenceEquals(_ a: Object, _ b: Object) -> Boolean

 

static Boolean ReferenceEquals(Object a, Object b)

Parameters:

  • a: left value
  • b: right value

RTTI

Raw RTTI info for this type.

 

property RTTI: ^IslandTypeInfo read;

 

IslandTypeInfo* RTTI { get; }

 

var RTTI: UnsafeMutablePointer<IslandTypeInfo> { get{} }

 

IslandTypeInfo* RTTI { __get; }

SizeOfType

Returns the size of this type, for value types this is the size as it's stored locally, for classes as it would be stored on the heap.

 

property SizeOfType: Int32 read;

 

Int32 SizeOfType { get; }

 

var SizeOfType: Int32 { get{} }

 

Int32 SizeOfType { __get; }

SubType

Element type for this type; depending on the type this could be a pointer sub type or array element type.

 

property SubType: Type read;

 

Type SubType { get; }

 

var SubType: Type { get{} }

 

Type SubType { __get; }

ToString  virtual    (declared in Object)

Gets the string representation of this method.

 

method ToString: String

 

String ToString()

 

func ToString() -> String

 

String ToString()

TypeIsValueType

Helper to determine if a type info record points to a struct or enum

 

class method TypeIsValueType(aType: ^IslandTypeInfo): Boolean

 

static Boolean TypeIsValueType(IslandTypeInfo* aType)

 

static func TypeIsValueType(_ aType: UnsafeMutablePointer<IslandTypeInfo>) -> Boolean

 

static Boolean TypeIsValueType(IslandTypeInfo* aType)

Parameters:

  • aType:

 

Attributes

Custom attributes defined on this type

 

property Attributes: IEnumerable<CustomAttribute> read;

 

IEnumerable<CustomAttribute> Attributes { get; }

 

var Attributes: IEnumerable<CustomAttribute> { get{} }

 

IEnumerable<CustomAttribute> Attributes { __get; }

BaseType

Parent type for this type.

 

property BaseType: Type read;

 

Type BaseType { get; }

 

var BaseType: Type { get{} }

 

Type BaseType { __get; }

BoxedDataOffset

For value types, the offset the data starts at; including alignment

 

property BoxedDataOffset: Int32 read;

 

Int32 BoxedDataOffset { get; }

 

var BoxedDataOffset: Int32 { get{} }

 

Int32 BoxedDataOffset { __get; }

Code

Type code; for core types

 

property Code: TypeCodes read;

 

TypeCodes Code { get; }

 

var Code: TypeCodes { get{} }

 

TypeCodes Code { __get; }

COMGuids

Returns a sequence of 0 or more guids attached to this type.

 

property COMGuids: IEnumerable<Guid> read;

 

IEnumerable<Guid> COMGuids { get; }

 

var COMGuids: IEnumerable<Guid> { get{} }

 

IEnumerable<Guid> COMGuids { __get; }

Constants

Returns a sequence of constants in this type

 

property Constants: IEnumerable<ConstantInfo> read;

 

IEnumerable<ConstantInfo> Constants { get; }

 

var Constants: IEnumerable<ConstantInfo> { get{} }

 

IEnumerable<ConstantInfo> Constants { __get; }

DefFlags

Flags for this type

 

property DefFlags: TypeDefFlags read;

 

TypeDefFlags DefFlags { get; }

 

var DefFlags: TypeDefFlags { get{} }

 

TypeDefFlags DefFlags { __get; }

Events

Returns a sequence of events on this type

 

property Events: IEnumerable<EventInfo> read;

 

IEnumerable<EventInfo> Events { get; }

 

var Events: IEnumerable<EventInfo> { get{} }

 

IEnumerable<EventInfo> Events { __get; }

Fields

Returns a sequence of fields in this type

 

property Fields: IEnumerable<FieldInfo> read;

 

IEnumerable<FieldInfo> Fields { get; }

 

var Fields: IEnumerable<FieldInfo> { get{} }

 

IEnumerable<FieldInfo> Fields { __get; }

Flags

Flags defined on this type

 

property Flags: IslandTypeFlags read;

 

IslandTypeFlags Flags { get; }

 

var Flags: IslandTypeFlags { get{} }

 

IslandTypeFlags Flags { __get; }

GenericArguments

Returns a sequence of generic arguments.

 

property GenericArguments: IEnumerable<Type> read;

 

IEnumerable<Type> GenericArguments { get; }

 

var GenericArguments: IEnumerable<Type> { get{} }

 

IEnumerable<Type> GenericArguments { __get; }

Interfaces

Returns a sequence of interfaces this type implements

 

property Interfaces: IEnumerable<Type> read;

 

IEnumerable<Type> Interfaces { get; }

 

var Interfaces: IEnumerable<Type> { get{} }

 

IEnumerable<Type> Interfaces { __get; }

IsCocoaClass Android, iOS, iOS Simulator, macOS, tvOS, tvOS Simulator, Ubuntu, UIKit for Mac, watchOS Simulator, watchOS-arm64_32, watchOS-armv7k, WebAssembly, Windows

True if this type is a cocoa class

 

property IsCocoaClass: Boolean read;

 

Boolean IsCocoaClass { get; }

 

var IsCocoaClass: Boolean { get{} }

 

Boolean IsCocoaClass { __get; }

IsComInterface Android, iOS, iOS Simulator, macOS, tvOS, tvOS Simulator, Ubuntu, UIKit for Mac, watchOS Simulator, watchOS-arm64_32, watchOS-armv7k, WebAssembly, Windows

True if this type is a COM interface

 

property IsComInterface: Boolean read;

 

Boolean IsComInterface { get; }

 

var IsComInterface: Boolean { get{} }

 

Boolean IsComInterface { __get; }

IsDelegate

True if this type is a delegate or function pointer

 

property IsDelegate: Boolean read;

 

Boolean IsDelegate { get; }

 

var IsDelegate: Boolean { get{} }

 

Boolean IsDelegate { __get; }

IsEnum

True if this type is an enum

 

property IsEnum: Boolean read;

 

Boolean IsEnum { get; }

 

var IsEnum: Boolean { get{} }

 

Boolean IsEnum { __get; }

IsFloat

True if this type is a Single or Double.

 

property IsFloat: Boolean read;

 

Boolean IsFloat { get; }

 

var IsFloat: Boolean { get{} }

 

Boolean IsFloat { __get; }

IsInteger

True if this type is an integer type.

 

property IsInteger: Boolean read;

 

Boolean IsInteger { get; }

 

var IsInteger: Boolean { get{} }

 

Boolean IsInteger { __get; }

IsIntegerOrFloat

True if this type is an integer or floating point type.

 

property IsIntegerOrFloat: Boolean read;

 

Boolean IsIntegerOrFloat { get; }

 

var IsIntegerOrFloat: Boolean { get{} }

 

Boolean IsIntegerOrFloat { __get; }

IsSigned

Use this to check if an integer type is signed or not (unsigned)

 

property IsSigned: Boolean read;

 

Boolean IsSigned { get; }

 

var IsSigned: Boolean { get{} }

 

Boolean IsSigned { __get; }

IsSwiftClass Android, iOS, iOS Simulator, macOS, tvOS, tvOS Simulator, Ubuntu, UIKit for Mac, watchOS Simulator, watchOS-arm64_32, watchOS-armv7k, WebAssembly, Windows

True if this class is a swift class

 

property IsSwiftClass: Boolean read;

 

Boolean IsSwiftClass { get; }

 

var IsSwiftClass: Boolean { get{} }

 

Boolean IsSwiftClass { __get; }

IsValueType

Returns true if this type is a valuetype

 

property IsValueType: Boolean read;

 

Boolean IsValueType { get; }

 

var IsValueType: Boolean { get{} }

 

Boolean IsValueType { __get; }

Members

Gets all members defined in this type

 

property Members: IEnumerable<MemberInfo> read;

 

IEnumerable<MemberInfo> Members { get; }

 

var Members: IEnumerable<MemberInfo> { get{} }

 

IEnumerable<MemberInfo> Members { __get; }

Methods

Returns a sequence of all members in this type

 

property Methods: IEnumerable<MethodInfo> read;

 

IEnumerable<MethodInfo> Methods { get; }

 

var Methods: IEnumerable<MethodInfo> { get{} }

 

IEnumerable<MethodInfo> Methods { __get; }

Name

Returns the full type name of this type

 

property Name: String read;

 

String Name { get; }

 

var Name: String { get{} }

 

String Name { __get; }

NestedTypes

Returns all types nested in this type

 

property NestedTypes: IEnumerable<Type> read;

 

IEnumerable<Type> NestedTypes { get; }

 

var NestedTypes: IEnumerable<Type> { get{} }

 

IEnumerable<Type> NestedTypes { __get; }

ObjectModel Android, iOS, iOS Simulator, macOS, tvOS, tvOS Simulator, Ubuntu, UIKit for Mac, watchOS Simulator, watchOS-arm64_32, watchOS-armv7k, WebAssembly, Windows

Returns the object model of this type.

 

property ObjectModel: ObjectModel read;

 

ObjectModel ObjectModel { get; }

 

var ObjectModel: ObjectModel { get{} }

 

ObjectModel ObjectModel { __get; }

Properties

Returns a sequence of properties in this class.

 

property Properties: IEnumerable<PropertyInfo> read;

 

IEnumerable<PropertyInfo> Properties { get; }

 

var Properties: IEnumerable<PropertyInfo> { get{} }

 

IEnumerable<PropertyInfo> Properties { __get; }

RTTI

Raw RTTI info for this type.

 

property RTTI: ^IslandTypeInfo read;

 

IslandTypeInfo* RTTI { get; }

 

var RTTI: UnsafeMutablePointer<IslandTypeInfo> { get{} }

 

IslandTypeInfo* RTTI { __get; }

SizeOfType

Returns the size of this type, for value types this is the size as it's stored locally, for classes as it would be stored on the heap.

 

property SizeOfType: Int32 read;

 

Int32 SizeOfType { get; }

 

var SizeOfType: Int32 { get{} }

 

Int32 SizeOfType { __get; }

SubType

Element type for this type; depending on the type this could be a pointer sub type or array element type.

 

property SubType: Type read;

 

Type SubType { get; }

 

var SubType: Type { get{} }

 

Type SubType { __get; }

AllTypes

Gets access to all types loaded/compiled in.

 

class property AllTypes: IEnumerable<Type> read;

 

class IEnumerable<Type> AllTypes { get; }

 

static var AllTypes: IEnumerable<Type> { get{} }

 

class IEnumerable<Type> AllTypes { __get; }

 

ReferenceEquals    (declared in Object)

Compares two references for equivalence (even if they have an equals operator)

 

class method ReferenceEquals(a: Object; b: Object): Boolean

 

static Boolean ReferenceEquals(Object a, Object b)

 

static func ReferenceEquals(_ a: Object, _ b: Object) -> Boolean

 

static Boolean ReferenceEquals(Object a, Object b)

Parameters:

  • a: left value
  • b: right value

TypeIsValueType

Helper to determine if a type info record points to a struct or enum

 

class method TypeIsValueType(aType: ^IslandTypeInfo): Boolean

 

static Boolean TypeIsValueType(IslandTypeInfo* aType)

 

static func TypeIsValueType(_ aType: UnsafeMutablePointer<IslandTypeInfo>) -> Boolean

 

static Boolean TypeIsValueType(IslandTypeInfo* aType)

Parameters:

  • aType:

 

constructor    (declared in Object)

Default constructor.

 

constructor

 

Type()

 

init()

 

Type()

Equals  override virtual

Returns true if the target object matches this one, by default compares the reference.

 

method Equals(other: Object): Boolean

 

Boolean Equals(Object other)

 

func Equals(_ other: Object) -> Boolean

 

Boolean Equals(Object other)

Parameters:

  • other: the reference to compare this with.

Finalize  protected virtual    (declared in Object)

Finalizer implementation. If not overriden it's not called at all, the runtime checks if there is an override before calling a finalizer.

 

method Finalize

 

void Finalize()

 

func Finalize()

 

void Finalize()

GetHashCode  override virtual

Returns a hashcode for this object. Overriden implementations should make sure that the number returned here is constant given the same object.

 

method GetHashCode: Int32

 

Int32 GetHashCode()

 

func GetHashCode() -> Int32

 

Int32 GetHashCode()

GetType    (declared in Object)

Returns the actual type of this class

 

method GetType: Type

 

Type GetType()

 

func GetType() -> Type

 

Type GetType()

Instantiate

Instantiates this class by calling the default constructor; only works if there is a constructor with no parameters.

 

method Instantiate: Object

 

Object Instantiate()

 

func Instantiate() -> Object

 

Object Instantiate()

Instantiate<T>

Instantiate with a specific lifetime management provider.

 

method Instantiate<T>: Object

 

Object Instantiate<T>()

 

func Instantiate<T>() -> Object

 

Object Instantiate<T>()

IsAssignableFrom

Returns true if this type is assignable from another type

 

method IsAssignableFrom(aOrg: Type): Boolean

 

Boolean IsAssignableFrom(Type aOrg)

 

func IsAssignableFrom(_ aOrg: Type) -> Boolean

 

Boolean IsAssignableFrom(Type aOrg)

Parameters:

  • aOrg:

IsSubclassOf

Checks if a type is a subclass of another type.

 

method IsSubclassOf(aType: Type): Boolean

 

Boolean IsSubclassOf(Type aType)

 

func IsSubclassOf(_ aType: Type) -> Boolean

 

Boolean IsSubclassOf(Type aType)

Parameters:

  • aType: The type to compare against

ToString  virtual    (declared in Object)

Gets the string representation of this method.

 

method ToString: String

 

String ToString()

 

func ToString() -> String

 

String ToString()