IType Interface
From The Oxygene Language Wiki
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
| | |
|---|---|
| GetBinaryOperators(BinaryOperator): Array of IMethod | Returns a list of operator overload methods |
| GetConstant(aName: String): IConstant | Returns a constant by name |
| GetConstructors: array of IMethod | Returns all constructors for this class or nil |
| GetEvents(aName: String): array of IEvent | Searches through the class for events |
| GetField(aName: String): IField | Searches for a field by name |
| GetImplements(no: Integer): IImplements | Returns the implements for this type by index |
| GetInterface(no: Integer): IType | Returns the interfaces this type implements by index |
| GetMembers: array of IMember | Returns all members in this class |
| GetMethods(aName: String): array of IMethod | Searches 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): ITypeReference | Returns a nested class by index. The total number of items can be retrieved by accessing Count |
| GetNestedClass(aName: String): ITypeReference | Returns a nested class by index. The total number of items can be retrieved by accessing Count |
| GetOperators(anOp: UnaryOperator): array of IMethod | Returns the unary operators by operator type |
| GetProperties(aName: String): array of IProperty | Searches 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 IEvent | Searches for a static event by name |
| GetStaticField(aName: String): IField | Searches for a static field by name |
| GetStaticMethods(aName: String): array of IMethod | Searches 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 IProperty | Searches 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): Boolean | Checks if the type in the parameter can be assigned to this type |
| IsAssignableTo(aType: IType): Boolean | Checks if this type can be assigned to the one in the parameter |
Properties
| | |
|---|---|
| Fullname: String | The full name of the type including any type parameters or array specifiers |
| ImplementsCount: Int32 | Number of implements in this class |
| InterfaceCount: Int32 | Number 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: TypeKind | Returns the type kind |
| Name: String | Returns the name of this type without a namespace |
| Namespace: String | Returns the namespace of this type without the type |
| NestedClassCount: Integer | Returns the number of nested classes |
| ParentType: IType | Returns the parent type |
| Static: Boolean | Static class that is generally defined as an abstract and sealed class |
See Also
- Cirrus
- External Links:
- Prism Aspects to Help with Monobjc Development (RemObjects Blogs)
Area: Oxygene Language
Compiler version: Oxygene 5
Language Glossary — Keywords — Types — FAQ — How To