1
如何以编程方式将一个EGeneric类型参数添加到EAttribute
? 我可以这样创建EAttribute:如何以编程方式向EAttribute添加EGeneric类型参数?
EAttribute eAttribute = EcoreFactory.eINSTANCE.createEAttribute();
eAttribute.setName("myAttribute");
EDataType dataType = EcorePackage.eINSTANCE.getEEList();
// add here String to List as generic argument?
eAttribute.setEType(dataType);
但随着该代码段没有指定EEList
的泛型类型参数。在Eclipse中,我将使用New Child > EGeneric Type Argument
修复该问题,然后将EGeneric Type Argument的EClassifier
设置为EString
。但我怎样才能以编程的方式做到这一点?