Type

Overview

RTTI class for types

Location

  • Reference:
    • Elements.dll  .NET, .NET Core 6.0, .NET Standard 2.0
    • elements.jar  Cooper
    • Elements.fx  Island
    • libElements.fx  Toffee
  • Namespace: RemObjects.Elements.RTL.Reflection
  • Platforms: .NET, .NET Core 6.0, .NET Standard 2.0, Cooper, Island, Toffee
  • Mapped to:
    • Type  .NET, .NET Core 6.0, .NET Standard 2.0
    • Class  Cooper
    • Type  Island

 

constructor init() Toffee

 

init(init )

Parameters:

  • :

constructor withPlatformType(PlatformType)

 

constructor withPlatformType(aType: PlatformType)

 

Type withPlatformType(PlatformType aType)

 

init(withPlatformType aType: PlatformType)

 

Type withPlatformType(PlatformType aType)

 

Sub New withPlatformType(aType As PlatformType)

Parameters:

  • aType:

AllTypes  virtual

Returns all known types at this point .Note that depending on the platform this might be incomplete when types are not loaded yet.

 

class property AllTypes: ImmutableList<Type> read;

 

class ImmutableList<Type> AllTypes { get; }

 

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

 

class ImmutableList<Type> AllTypes { __get; }

 

Shared ReadOnly Property AllTypes() As ImmutableList<Type>

BaseType  virtual

Returns the base type, the type this class descends from for this type. Could be null for root types.

 

property BaseType: nullable Type read;

 

Type? BaseType { get; }

 

// .NET, .NET Core 6.0, .NET Standard 2.0, Island
var BaseType: Type? { get{} }
// Toffee
var BaseType: Type { get{} }

 

Type BaseType { __get; }

 

ReadOnly Property BaseType() As Type?

Fields  virtual .NET, .NET Core 6.0, .NET Standard 2.0, Island, Toffee

 

property Fields: ImmutableList<Field> read;

 

ImmutableList<Field> Fields { get; }

 

var Fields: ImmutableList<Field> { get{} }

 

ReadOnly Property Fields() As ImmutableList<Field>

FullName .NET, .NET Core 6.0, .NET Standard 2.0, Island

 

property FullName: String read;

 

String FullName { get; }

 

var FullName: String { get{} }

 

ReadOnly Property FullName() As String

GetType  virtual

Gets a type by it's (full) name. Usually this wants the full type name, on .NET the assembly name is required too.

 

class method GetType(aName: not nullable String): nullable Type

 

static Type? GetType(String! aName)

 

static func GetType(_ aName: String) -> Type

 

static Type GetType(String aName)

 

Shared Function GetType(aName As String) As Type?

Parameters:

  • aName:

Instantiate Cooper, Island

 

method Instantiate: Object

 

Object Instantiate()

 

func Instantiate() -> Object

 

Object Instantiate()

 

Function Instantiate() As Object

Instantiate Instantiate(): Object  virtual Toffee

 

func Instantiate(Instantiate ) -> Object

Parameters:

  • :

Instantiate .NET, .NET Core 6.0, .NET Standard 2.0

 

method Instantiate: Object

 

Object Instantiate()

 

func Instantiate() -> Object

 

Function Instantiate() As Object

Interfaces  virtual

Returns the interfaces this class impelments

 

property Interfaces: ImmutableList<Type> read;

 

ImmutableList<Type> Interfaces { get; }

 

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

 

ImmutableList<Type> Interfaces { __get; }

 

ReadOnly Property Interfaces() As ImmutableList<Type>

IsArray  virtual

True if a type is an array

 

property IsArray: Boolean read;

 

Boolean IsArray { get; }

 

var IsArray: Boolean { get{} }

 

Boolean IsArray { __get; }

 

ReadOnly Property IsArray() As Boolean

IsClass  virtual

True if a type is a class and not a value type.

 

property IsClass: Boolean read;

 

Boolean IsClass { get; }

 

var IsClass: Boolean { get{} }

 

Boolean IsClass { __get; }

 

ReadOnly Property IsClass() As Boolean

IsDelegate  virtual Toffee

True if a type is a delegate type.

 

var IsDelegate: Boolean { get{} }

IsEnum  virtual

True if a type is an enum.

 

property IsEnum: Boolean read;

 

Boolean IsEnum { get; }

 

var IsEnum: Boolean { get{} }

 

Boolean IsEnum { __get; }

 

ReadOnly Property IsEnum() As Boolean

IsInterface  virtual

True if a type is an interface type

 

property IsInterface: Boolean read;

 

Boolean IsInterface { get; }

 

var IsInterface: Boolean { get{} }

 

Boolean IsInterface { __get; }

 

ReadOnly Property IsInterface() As Boolean

IsSubclassOf (Type): Boolean  virtual Island, Toffee

Returns a type is a subclass of another type

 

method IsSubclassOf(aType: Type): Boolean

 

Boolean IsSubclassOf(Type aType)

 

func IsSubclassOf(_ aType: Type) -> Boolean

 

Function IsSubclassOf(aType As Type) As Boolean

Parameters:

  • aType:

IsSubclassOf (Type): Boolean .NET, .NET Core 6.0, .NET Standard 2.0

 

method IsSubclassOf(aType: Type): Boolean

 

Boolean IsSubclassOf(Type aType)

 

func IsSubclassOf(_ aType: Type) -> Boolean

 

Function IsSubclassOf(aType As Type) As Boolean

Parameters:

  • aType:

IsValueType  virtual

Returns true if a type is a value type; note on most platforms are also enums

 

property IsValueType: Boolean read;

 

Boolean IsValueType { get; }

 

var IsValueType: Boolean { get{} }

 

Boolean IsValueType { __get; }

 

ReadOnly Property IsValueType() As Boolean

MethodFields Cooper

 

property MethodFields: ImmutableList<Field> read;

 

ImmutableList<Field> MethodFields { get; }

 

var MethodFields: ImmutableList<Field> { get{} }

 

ImmutableList<Field> MethodFields { __get; }

 

ReadOnly Property MethodFields() As ImmutableList<Field>

Methods  virtual

Gets a list of methods in a type

 

property Methods: ImmutableList<Method> read;

 

ImmutableList<Method> Methods { get; }

 

var Methods: ImmutableList<Method> { get{} }

 

ImmutableList<Method> Methods { __get; }

 

ReadOnly Property Methods() As ImmutableList<Method>

Name  virtual

Returns the name of this type

 

property Name: String read;

 

String Name { get; }

 

var Name: String { get{} }

 

String Name { __get; }

 

ReadOnly Property Name() As String

ObjectModel Island

 

property ObjectModel: ObjectModel read;

 

ObjectModel ObjectModel { get; }

 

var ObjectModel: ObjectModel { get{} }

 

ReadOnly Property ObjectModel() As ObjectModel

Properties  virtual .NET, .NET Core 6.0, .NET Standard 2.0, Island, Toffee

Returns a list of properties in this type

 

property Properties: ImmutableList<Property> read;

 

ImmutableList<Property> Properties { get; }

 

var Properties: ImmutableList<Property> { get{} }

 

ReadOnly Property Properties() As ImmutableList<Property>

TypeClass  virtual Toffee

Returns the original type info of this class

 

var TypeClass: Class { get{} }

 

BaseType  virtual

Returns the base type, the type this class descends from for this type. Could be null for root types.

 

property BaseType: nullable Type read;

 

Type? BaseType { get; }

 

// .NET, .NET Core 6.0, .NET Standard 2.0, Island
var BaseType: Type? { get{} }
// Toffee
var BaseType: Type { get{} }

 

Type BaseType { __get; }

 

ReadOnly Property BaseType() As Type?

Fields  virtual .NET, .NET Core 6.0, .NET Standard 2.0, Island, Toffee

 

property Fields: ImmutableList<Field> read;

 

ImmutableList<Field> Fields { get; }

 

var Fields: ImmutableList<Field> { get{} }

 

ReadOnly Property Fields() As ImmutableList<Field>

FullName .NET, .NET Core 6.0, .NET Standard 2.0, Island

 

property FullName: String read;

 

String FullName { get; }

 

var FullName: String { get{} }

 

ReadOnly Property FullName() As String

Interfaces  virtual

Returns the interfaces this class impelments

 

property Interfaces: ImmutableList<Type> read;

 

ImmutableList<Type> Interfaces { get; }

 

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

 

ImmutableList<Type> Interfaces { __get; }

 

ReadOnly Property Interfaces() As ImmutableList<Type>

IsArray  virtual

True if a type is an array

 

property IsArray: Boolean read;

 

Boolean IsArray { get; }

 

var IsArray: Boolean { get{} }

 

Boolean IsArray { __get; }

 

ReadOnly Property IsArray() As Boolean

IsClass  virtual

True if a type is a class and not a value type.

 

property IsClass: Boolean read;

 

Boolean IsClass { get; }

 

var IsClass: Boolean { get{} }

 

Boolean IsClass { __get; }

 

ReadOnly Property IsClass() As Boolean

IsDelegate  virtual Toffee

True if a type is a delegate type.

 

var IsDelegate: Boolean { get{} }

IsEnum  virtual

True if a type is an enum.

 

property IsEnum: Boolean read;

 

Boolean IsEnum { get; }

 

var IsEnum: Boolean { get{} }

 

Boolean IsEnum { __get; }

 

ReadOnly Property IsEnum() As Boolean

IsInterface  virtual

True if a type is an interface type

 

property IsInterface: Boolean read;

 

Boolean IsInterface { get; }

 

var IsInterface: Boolean { get{} }

 

Boolean IsInterface { __get; }

 

ReadOnly Property IsInterface() As Boolean

IsValueType  virtual

Returns true if a type is a value type; note on most platforms are also enums

 

property IsValueType: Boolean read;

 

Boolean IsValueType { get; }

 

var IsValueType: Boolean { get{} }

 

Boolean IsValueType { __get; }

 

ReadOnly Property IsValueType() As Boolean

MethodFields Cooper

 

property MethodFields: ImmutableList<Field> read;

 

ImmutableList<Field> MethodFields { get; }

 

var MethodFields: ImmutableList<Field> { get{} }

 

ImmutableList<Field> MethodFields { __get; }

 

ReadOnly Property MethodFields() As ImmutableList<Field>

Methods  virtual

Gets a list of methods in a type

 

property Methods: ImmutableList<Method> read;

 

ImmutableList<Method> Methods { get; }

 

var Methods: ImmutableList<Method> { get{} }

 

ImmutableList<Method> Methods { __get; }

 

ReadOnly Property Methods() As ImmutableList<Method>

Name  virtual

Returns the name of this type

 

property Name: String read;

 

String Name { get; }

 

var Name: String { get{} }

 

String Name { __get; }

 

ReadOnly Property Name() As String

ObjectModel Island

 

property ObjectModel: ObjectModel read;

 

ObjectModel ObjectModel { get; }

 

var ObjectModel: ObjectModel { get{} }

 

ReadOnly Property ObjectModel() As ObjectModel

Properties  virtual .NET, .NET Core 6.0, .NET Standard 2.0, Island, Toffee

Returns a list of properties in this type

 

property Properties: ImmutableList<Property> read;

 

ImmutableList<Property> Properties { get; }

 

var Properties: ImmutableList<Property> { get{} }

 

ReadOnly Property Properties() As ImmutableList<Property>

TypeClass  virtual Toffee

Returns the original type info of this class

 

var TypeClass: Class { get{} }

AllTypes  virtual

Returns all known types at this point .Note that depending on the platform this might be incomplete when types are not loaded yet.

 

class property AllTypes: ImmutableList<Type> read;

 

class ImmutableList<Type> AllTypes { get; }

 

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

 

class ImmutableList<Type> AllTypes { __get; }

 

Shared ReadOnly Property AllTypes() As ImmutableList<Type>

 

GetType  virtual

Gets a type by it's (full) name. Usually this wants the full type name, on .NET the assembly name is required too.

 

class method GetType(aName: not nullable String): nullable Type

 

static Type? GetType(String! aName)

 

static func GetType(_ aName: String) -> Type

 

static Type GetType(String aName)

 

Shared Function GetType(aName As String) As Type?

Parameters:

  • aName:

 

constructor init() Toffee

 

init(init )

Parameters:

  • :

constructor withPlatformType(PlatformType)

 

constructor withPlatformType(aType: PlatformType)

 

Type withPlatformType(PlatformType aType)

 

init(withPlatformType aType: PlatformType)

 

Type withPlatformType(PlatformType aType)

 

Sub New withPlatformType(aType As PlatformType)

Parameters:

  • aType:

Instantiate Cooper, Island

 

method Instantiate: Object

 

Object Instantiate()

 

func Instantiate() -> Object

 

Object Instantiate()

 

Function Instantiate() As Object

Instantiate Instantiate(): Object  virtual Toffee

 

func Instantiate(Instantiate ) -> Object

Parameters:

  • :

IsSubclassOf (Type): Boolean  virtual Island, Toffee

Returns a type is a subclass of another type

 

method IsSubclassOf(aType: Type): Boolean

 

Boolean IsSubclassOf(Type aType)

 

func IsSubclassOf(_ aType: Type) -> Boolean

 

Function IsSubclassOf(aType As Type) As Boolean

Parameters:

  • aType:

Instantiate .NET, .NET Core 6.0, .NET Standard 2.0

 

method Instantiate: Object

 

Object Instantiate()

 

func Instantiate() -> Object

 

Function Instantiate() As Object