InstanceSpecification - slot


There is a possibility to create IInstanceSpecification and add Classifier.
How can I define Slot for this IInstanceSpecification and set value for structural feature of Classifier?


Hi Anita.W,

Sorry for my late reply. Please refer to the flash movie about how to define slot and set value for structural feature of classifier at:

If there are any further inquiries, please do not hesitate to contact me.

Best regards,
Lilian Wong

I am trying to create InstanceSpecification with the Open API, but the following code does not work correctly:

IInstanceSpecification instance = IModelElementFactory.instance().createInstanceSpecification();
instance.setName("RT_UML instance");

instance.addSlot(new ISlot());

What’s wrong with that code? Any help is appreciated.

Thank you in advance.

Hi Anita. W,

Thanks for your reply. ISlot is an Interface, not a Class. You should call IModelElementFactory.instance().createSlot()

If there is anything else I can help, please feel free to ask.

Best regards,
Lilian Wong