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
  • Mapped to:
    • System.Type  .NET, .NET Standard 2.0
    • java.lang.Class  Cooper
    • RemObjects.Elements.System.Type  Island, ToffeeV2

 

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; }

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; }

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)

Parameters:

  • aName:

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; }

IsArray

True if a type is an array

 

property IsArray: Boolean read;

 

Boolean IsArray { get; }

 

var IsArray: Boolean { get{} }

 

Boolean IsArray { __get; }

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; }

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; }

IsInterface

True if a type is an interface type

 

property IsInterface: Boolean read;

 

Boolean IsInterface { get; }

 

var IsInterface: Boolean { get{} }

 

Boolean IsInterface { __get; }

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; }

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; }

Name

Returns the name of this type

 

property Name: String read;

 

String Name { get; }

 

var Name: String { get{} }

 

String Name { __get; }

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{} }

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; }

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; }

IsArray

True if a type is an array

 

property IsArray: Boolean read;

 

Boolean IsArray { get; }

 

var IsArray: Boolean { get{} }

 

Boolean IsArray { __get; }

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; }

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; }

IsInterface

True if a type is an interface type

 

property IsInterface: Boolean read;

 

Boolean IsInterface { get; }

 

var IsInterface: Boolean { get{} }

 

Boolean IsInterface { __get; }

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; }

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; }

Name

Returns the name of this type

 

property Name: String read;

 

String Name { get; }

 

var Name: String { get{} }

 

String Name { __get; }

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{} }

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; }

 

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)

Parameters:

  • aName:

 

IsSubclassOf  virtual Toffee

Returns a type is a subclass of another type

 

func IsSubclassOf(_ aType: Type) -> Boolean

Parameters:

  • aType: