No Cast in case of templates [message #615689] |
Thu, 10 May 2007 23:13 |
Pradeep Messages: 54 Registered: July 2009 |
Member |
|
|
Hi,
I created a uml primitive type with Map<String, Datum> and assigned it to
content variable in a class.
Now when I convert it to Ecore then to code, I am getting the following
code. If you see the eUnset function there is proper cast but there is none
in eSet function. The compiler is complaining about the same saying it
cannot accept object.
How can I avoid this.
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@SuppressWarnings("unchecked")
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case NewheadPackage.DATA_MAP__CONTENT:
setContent(newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case NewheadPackage.DATA_MAP__CONTENT:
setContent((Map<String, Datum>)null);
return;
}
super.eUnset(featureID);
}
|
|
|
Powered by
FUDForum. Page generated in 0.03663 seconds