ITypeDefinition Interface
From The Oxygene Language Wiki
This is a Language topic
Feel free to add your notes to this topic below.
ITypeDefinition = public interface (ITypeReference, IType, IAttributeDefinitionProvider, IAttributesProvider, IGenericParametersProvider, IElementDefinition, IPosition)
ITypeDefinition is a class, record, delegate or enum type defined in the current project. This interface can be used to add new members to this type or modify existing ones. To query the members of this type, use the IType Interface.
Namespace: Cirrus
Members
| | |
|---|---|
| AddConstant(aName: String; aType: IType): IConstantDefinition | Adds a new constant |
| AddConstructor(aStatic: Boolean): IMethodDefinition | Adds a new constructor to this class |
| AddEvent(aName: String; aType: IType; aStatic: Boolean): IEventDefinition | Adds a new event |
| AddField(aName: String; aType: IType; aStatic: Boolean): IFieldDefinition | Adds a new field |
| AddFinalizer: IMethodDefinition | Adds a finalizer to the method list |
| AddImplements(IMethodDefinition; aInterface: IType; aInterfaceMethod: IMethod): IImplements | Adds a new method implements |
| AddInterface(aInterface: IType) | Adds a new implemented interface to this class |
| AddMethod(aName: String; aType: IType; aStatic: Boolean): IMethodDefinition | Adds a new method to this class |
| AddOperator(anOp: BinaryOperator; aParam1, aParam2, aResult: IType):IMethodDefinition | Adds a new binary operator overload to this class |
| AddOperator(anOp: UnaryOperator, aParam, aResult: IType): IMethodDefinition | Adds a new unary operator overload to this class |
| AddProperty(aName: String; aType: IType; aStatic: Boolean):IPropertyDefinition | Adds a new property to this class |
| FindContextType(aName: String): IType | Finds a type that is valid in the context of this method; this supports passing strings like "Array of String" and "System.Collections.Generic.List<class 0;> to create generic types. "method 0" is the first method generic parameter |
| GetContextType(aName: String): IType | For more info on the syntax |
| GetEvent(no: Integer): IEventDefinition | Returns an event by index |
| GetField(no: Integer):IFieldDefinition | Returns a field by index (includes constants) |
| GetMethod(no: Integer): IMethodDefinition | Returns a method by index, includes constructors and operators |
| GetProperty(no: Integer): IPropertyDefinition | Returns a property by index |
| GetSelfType: IType | Returns the self type of the type this method is in, for generic types this is a generic type instantiated with its own parameters |
| GetUniqueIdentifier(aBaseName: string): string | Generates an identifier that is not used by the user or compiler |
| RemoveEvent(anEvent: IEventDefinition) | Removes an event definition from the events list in this class |
| RemoveEvent(no: Integer) | Removes an event definition from the events list in this class |
| RemoveField(aField: IFieldDefinition) | Removes a field from the field list in this class |
| RemoveField(no: Integer) | Removes a field from the field list in this class |
| RemoveImplements(aImplements: IImplements) | Removes an implements definition from this class |
| RemoveImplements(no: Integer) | Removes an implements definition from this class |
| RemoveInterface(anInterface: IType) | Removes an implemented interface from this type |
| RemoveInterface(no: Integer) | Removes an implemented interface from this type |
| RemoveMethod(aMethod: IMethodDefinition) | Removes a method from this type |
| RemoveMethod(no: Integer) | Removes a method from this type |
| RemoveProperty(aProperty: IPropertyDefinition) | Removes a property from this type |
| RemoveProperty(no: Integer) | Removes a property from this type |
| SetName(aNamespace, aName: String) | Sets the name of this type |
Properties
| | |
|---|---|
| EnumUnderlyingType: IType Interface | Gets or sets the underlying type of this enum |
| EventCount: Integer | Returns the number of events in this class |
| FieldCount: Integer | Returns the number of fields and constants in this type |
| MethodCount: Integer | Returns the number of methods in this type |
| ParentType: IType Interface | The parent type of this type |
| PropertyCount: Integer | Returns the number of properties in this class |
| Sealed: Boolean | Gets or sets if this class is sealed |
| Visibility: Visibility | Nested visibility; for non-nested types only private and public are valid |
See Also
- Cirrus
- External Links:
- Prism Aspects to Help with Monobjc Development (RemObjects Blogs)
- ITypeReference Interface
- IType Interface
- IAttributeDefinitionProvider Interface
- IAttributesProvider Interface
- IGenericParametersProvider Interface
- IElementDefinition Interface
- IPosition Interface
Area: Oxygene Language
Compiler version: Oxygene 5
Language Glossary — Keywords — Types — FAQ — How To