Type

Overview

RTTI class for types

Location

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

 

constructor

 

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

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

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 Standard 2.0, Island, ToffeeV2
var BaseType: Type? { get{} }
// Toffee
var BaseType: Type { get{} }

 

Type BaseType { __get; }

 

ReadOnly Property BaseType() As Type?

Fields .NET, .NET Standard 2.0, Island, Toffee, ToffeeV2

 

property Fields: ImmutableList<Field> read;

 

ImmutableList<Field> Fields { get; }

 

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

 

ReadOnly Property Fields() As ImmutableList<Field>

GetType

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)

 

// Toffee
static func GetType(_ aName: String) -> Type
// ToffeeV2
static func GetType(_ aName: String) -> Type?

 

static Type GetType(String aName)

 

Shared Function GetType(aName As String) As Type?

Parameters:

  • aName:

Instantiate Cooper, Island, Toffee, ToffeeV2

 

method Instantiate: Object

 

Object Instantiate()

 

func Instantiate() -> Object

 

Object Instantiate()

 

Function Instantiate() As Object

Instantiate .NET, .NET Standard 2.0

 

method Instantiate: Object

 

Object Instantiate()

 

func Instantiate() -> Object

 

Function Instantiate() As Object

Interfaces

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

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

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

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

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  virtual Toffee

Returns a type is a subclass of another type

 

func IsSubclassOf(_ aType: Type) -> Boolean

Parameters:

  • aType:

IsValueType

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

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

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, ToffeeV2

 

property ObjectModel: ObjectModel read;

 

ObjectModel ObjectModel { get; }

 

// Island
var ObjectModel: ObjectModel { get{} }
// ToffeeV2
var ObjectModel: ObjectModel { get{} }

 

ReadOnly Property ObjectModel() As ObjectModel

Properties .NET, .NET Standard 2.0, Island, Toffee, ToffeeV2

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

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 Standard 2.0, Island, ToffeeV2
var BaseType: Type? { get{} }
// Toffee
var BaseType: Type { get{} }

 

Type BaseType { __get; }

 

ReadOnly Property BaseType() As Type?

Fields .NET, .NET Standard 2.0, Island, Toffee, ToffeeV2

 

property Fields: ImmutableList<Field> read;

 

ImmutableList<Field> Fields { get; }

 

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

 

ReadOnly Property Fields() As ImmutableList<Field>

Interfaces

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

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

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

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

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

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

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

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, ToffeeV2

 

property ObjectModel: ObjectModel read;

 

ObjectModel ObjectModel { get; }

 

// Island
var ObjectModel: ObjectModel { get{} }
// ToffeeV2
var ObjectModel: ObjectModel { get{} }

 

ReadOnly Property ObjectModel() As ObjectModel

Properties .NET, .NET Standard 2.0, Island, Toffee, ToffeeV2

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

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

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)

 

// Toffee
static func GetType(_ aName: String) -> Type
// ToffeeV2
static func GetType(_ aName: String) -> Type?

 

static Type GetType(String aName)

 

Shared Function GetType(aName As String) As Type?

Parameters:

  • aName:

 

constructor

 

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, Toffee, ToffeeV2

 

method Instantiate: Object

 

Object Instantiate()

 

func Instantiate() -> Object

 

Object Instantiate()

 

Function Instantiate() As Object

IsSubclassOf  virtual Toffee

Returns a type is a subclass of another type

 

func IsSubclassOf(_ aType: Type) -> Boolean

Parameters:

  • aType:

Instantiate .NET, .NET Standard 2.0

 

method Instantiate: Object

 

Object Instantiate()

 

func Instantiate() -> Object

 

Function Instantiate() As Object