IType Interface

From The Oxygene Language Wiki

Jump to:navigation, search

This is a Language topic
Feel free to add your notes to this topic below.


IType = public interface

The IType interface is the base interface for any type in the compiler, both internal and external, including arrays, generics and anything else that is a type. The member query apis like GetField, GetMethods, GetEvents and GetProperties will also check the parent class and interfaces for that member, the GetConstructors call does not, as you cannot call an ancestor constructor on a sub-type unless it returns it.

Namespace: Cirrus


Members

Method
Description
GetBinaryOperators(BinaryOperator): Array of IMethodReturns a list of operator overload methods
GetConstant(aName: String): IConstantReturns a constant by name
GetConstructors: array of IMethodReturns all constructors for this class or nil
GetEvents(aName: String): array of IEventSearches through the class for events
GetField(aName: String): IFieldSearches for a field by name
GetImplements(no: Integer): IImplementsReturns the implements for this type by index
GetInterface(no: Integer): ITypeReturns the interfaces this type implements by index
GetMembers: array of IMemberReturns all members in this class
GetMethods(aName: String): array of IMethodSearches for a method and results the list of matches
GetMethod(name: String; args: array of IType; modifiers: array of ParameterModifier): IMethod Returns the instance method matching this signature
GetMethod(name: String; args: array of string; modifiers: array of ParameterModifier): IMethod Returns the instance method matching this signature
GetNestedClass(no: Integer): ITypeReferenceReturns a nested class by index. The total number of items can be retrieved by accessing Count
GetNestedClass(aName: String): ITypeReferenceReturns a nested class by index. The total number of items can be retrieved by accessing Count
GetOperators(anOp: UnaryOperator): array of IMethodReturns the unary operators by operator type
GetProperties(aName: String): array of IPropertySearches for a property by name
GetProperty(name: String; args: array of IType; modifiers: array of ParameterModifier): IProperty Returns the instance property matching this signature
GetProperty(name: String; args: array of string; modifiers: array of ParameterModifier): IProperty Returns the instance property matching this signature
GetStaticEvents(aName: String): array of IEventSearches for a static event by name
GetStaticField(aName: String): IFieldSearches for a static field by name
GetStaticMethods(aName: String): array of IMethodSearches for a static method by name
GetStaticMethod(name: String; args: array of IType; modifiers: array of ParameterModifier): IMethod Returns the static method matching this signature
GetStaticMethod(name: String; args: array of string; modifiers: array of ParameterModifier): IMethod Returns the static method matching this signature
GetStaticProperties(aName: String): array of IPropertySearches for a static property by name
GetStaticProperty(name: String; args: array of IType; modifiers: array of ParameterModifier): IProperty Returns the static property matching this signature
GetStaticProperty(name: String; args: array of string; modifiers: array of ParameterModifier): IProperty Returns the static property matching this signature
IsAssignableFrom(aType: IType): BooleanChecks if the type in the parameter can be assigned to this type
IsAssignableTo(aType: IType): BooleanChecks if this type can be assigned to the one in the parameter


Properties

Property
Description
Fullname: StringThe full name of the type including any type parameters or array specifiers
ImplementsCount: Int32Number of implements in this class
InterfaceCount: Int32Number of interfaces this type implements
IsReferenceType: Boolean Returns true if the type is a reference type. Note that false does not necessarily mean it is a value type, it could also be a generic type that can be either
IsValueType: Boolean Returns true if the type is a valuetype. Note that System.Enum and System.ValueType themselves are not valuetypes. Note that false does not necessarily mean it is a reference type, it could be a generic type that can be either
Kind: TypeKindReturns the type kind
Name: StringReturns the name of this type without a namespace
Namespace: StringReturns the namespace of this type without the type
NestedClassCount: IntegerReturns the number of nested classes
ParentType: ITypeReturns the parent type
Static: Boolean Static class that is generally defined as an abstract and sealed class


See Also


Oxygene-48.png

Area: Oxygene Language
Compiler version: Oxygene 5

Language GlossaryKeywordsTypesFAQHow To

Navigation
Areas
More
Toolbox