Meta Data Services Programming
ClassDef CreateInterfaceDef Method
The CreateInterfaceDef method creates a new interface definition and adds the interface to the collection of interfaces that are implemented by the class.
Syntax
Set variable = object.CreateInterfaceDef(sObjId, name, interfaceId, [ancestor], [flag])
The CreateInterfaceDef method syntax has the following parts.
Part | Description |
---|---|
variable | A variable declared as an InterfaceDef object. It receives the new interface definition. |
object | An object expression that evaluates to a ClassDef object |
sObjId | The object identifier to be assigned to the new interface definition object. If this parameter is set to OBJID_NULL, the repository engine assigns an object identifier for you. |
name | The name of the interface that is to be created. |
interfaceId | The interface identifier for this interface. If there is none, set this parameter to zero. |
ancestor | The InterfaceDef definition object for the interface that is the base interface from which the interface being created is derived. This parameter is optional. |
flag | Determines whether the interface is the default interface. If the interface that you are adding is the default interface, pass in the string "Default". Otherwise, pass in a null string. This parameter is optional. |
Remarks
When you indicate that an interface is the default interface for a class, you are actually setting the value of the ImplementsOptions annotational property on the Class Implements Interface relationship to TRUE.