Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2010-08-16 15:11:42 +0000
committerEike Stepper2010-08-16 15:11:42 +0000
commitbccb1ecac8631f77f214ec80ae6ed088cb940074 (patch)
tree9a8301efaa6a20cb601b37f6944a79e900c8520d /plugins/org.eclipse.emf.cdo.tests.model5
parent068e3314ab61cb813ae592b7b7eae95f5659b4b4 (diff)
downloadcdo-bccb1ecac8631f77f214ec80ae6ed088cb940074.tar.gz
cdo-bccb1ecac8631f77f214ec80ae6ed088cb940074.tar.xz
cdo-bccb1ecac8631f77f214ec80ae6ed088cb940074.zip
[322804] ClassCastException adding an object to an EList with objects of a custom data type
https://bugs.eclipse.org/bugs/show_bug.cgi?id=322804
Diffstat (limited to 'plugins/org.eclipse.emf.cdo.tests.model5')
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model5/model/model5.ecore5
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/legacy/model5/Model5Factory.java9
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/legacy/model5/Model5Package.java93
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/legacy/model5/impl/GenListOfBooleanImpl.java2
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/legacy/model5/impl/GenListOfCharImpl.java2
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/legacy/model5/impl/GenListOfDateImpl.java2
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/legacy/model5/impl/GenListOfDoubleImpl.java2
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/legacy/model5/impl/GenListOfFloatImpl.java2
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/legacy/model5/impl/GenListOfIntArrayImpl.java175
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/legacy/model5/impl/GenListOfIntImpl.java2
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/legacy/model5/impl/GenListOfIntegerImpl.java2
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/legacy/model5/impl/GenListOfLongImpl.java2
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/legacy/model5/impl/GenListOfShortImpl.java2
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/legacy/model5/impl/GenListOfStringImpl.java2
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/legacy/model5/impl/Model5FactoryImpl.java69
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/legacy/model5/impl/Model5PackageImpl.java78
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/legacy/model5/impl/TestFeatureMapImpl.java4
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/legacy/model5/util/Model5AdapterFactory.java22
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/legacy/model5/util/Model5Switch.java51
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/GenListOfIntArray.java55
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/Model5Factory.java8
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/Model5Package.java93
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/impl/GenListOfIntArrayImpl.java85
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/impl/Model5FactoryImpl.java69
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/impl/Model5PackageImpl.java78
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/util/Model5AdapterFactory.java22
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/util/Model5Switch.java51
27 files changed, 887 insertions, 100 deletions
diff --git a/plugins/org.eclipse.emf.cdo.tests.model5/model/model5.ecore b/plugins/org.eclipse.emf.cdo.tests.model5/model/model5.ecore
index b994aa3df5..741e481f75 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model5/model/model5.ecore
+++ b/plugins/org.eclipse.emf.cdo.tests.model5/model/model5.ecore
@@ -65,4 +65,9 @@
<eStructuralFeatures xsi:type="ecore:EAttribute" name="elements" upperBound="-1"
eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EChar"/>
</eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="GenListOfIntArray">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="elements" upperBound="-1"
+ eType="#//IntArray"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EDataType" name="IntArray" instanceClassName="int[]"/>
</ecore:EPackage>
diff --git a/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/legacy/model5/Model5Factory.java b/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/legacy/model5/Model5Factory.java
index a3f1483865..2542ec6b30 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/legacy/model5/Model5Factory.java
+++ b/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/legacy/model5/Model5Factory.java
@@ -17,6 +17,7 @@ import org.eclipse.emf.cdo.tests.model5.GenListOfDate;
import org.eclipse.emf.cdo.tests.model5.GenListOfDouble;
import org.eclipse.emf.cdo.tests.model5.GenListOfFloat;
import org.eclipse.emf.cdo.tests.model5.GenListOfInt;
+import org.eclipse.emf.cdo.tests.model5.GenListOfIntArray;
import org.eclipse.emf.cdo.tests.model5.GenListOfInteger;
import org.eclipse.emf.cdo.tests.model5.GenListOfLong;
import org.eclipse.emf.cdo.tests.model5.GenListOfShort;
@@ -152,6 +153,14 @@ public interface Model5Factory extends org.eclipse.emf.cdo.tests.model5.Model5Fa
GenListOfChar createGenListOfChar();
/**
+ * Returns a new object of class '<em>Gen List Of Int Array</em>'. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return a new object of class '<em>Gen List Of Int Array</em>'.
+ * @generated
+ */
+ GenListOfIntArray createGenListOfIntArray();
+
+ /**
* Returns the package supported by this factory. <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @return the package supported by this factory.
diff --git a/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/legacy/model5/Model5Package.java b/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/legacy/model5/Model5Package.java
index fff5751e4c..7bd42d734b 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/legacy/model5/Model5Package.java
+++ b/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/legacy/model5/Model5Package.java
@@ -12,6 +12,7 @@ package org.eclipse.emf.cdo.tests.legacy.model5;
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EDataType;
import org.eclipse.emf.ecore.EReference;
/**
@@ -416,6 +417,41 @@ public interface Model5Package extends org.eclipse.emf.cdo.tests.model5.Model5Pa
int GEN_LIST_OF_CHAR_FEATURE_COUNT = 1;
/**
+ * The meta object id for the '{@link org.eclipse.emf.cdo.tests.legacy.model5.impl.GenListOfIntArrayImpl
+ * <em>Gen List Of Int Array</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see org.eclipse.emf.cdo.tests.legacy.model5.impl.GenListOfIntArrayImpl
+ * @see org.eclipse.emf.cdo.tests.legacy.model5.impl.Model5PackageImpl#getGenListOfIntArray()
+ * @generated
+ */
+ int GEN_LIST_OF_INT_ARRAY = 13;
+
+ /**
+ * The feature id for the '<em><b>Elements</b></em>' attribute list. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int GEN_LIST_OF_INT_ARRAY__ELEMENTS = 0;
+
+ /**
+ * The number of structural features of the '<em>Gen List Of Int Array</em>' class. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int GEN_LIST_OF_INT_ARRAY_FEATURE_COUNT = 1;
+
+ /**
+ * The meta object id for the '<em>Int Array</em>' data type. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see org.eclipse.emf.cdo.tests.legacy.model5.impl.Model5PackageImpl#getIntArray()
+ * @generated
+ */
+ int INT_ARRAY = 14;
+
+ /**
* Returns the meta object for class '{@link org.eclipse.emf.cdo.tests.legacy.model5.TestFeatureMap
* <em>Test Feature Map</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
*
@@ -702,6 +738,37 @@ public interface Model5Package extends org.eclipse.emf.cdo.tests.model5.Model5Pa
EAttribute getGenListOfChar_Elements();
/**
+ * Returns the meta object for class '{@link org.eclipse.emf.cdo.tests.legacy.model5.GenListOfIntArray
+ * <em>Gen List Of Int Array</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for class '<em>Gen List Of Int Array</em>'.
+ * @see org.eclipse.emf.cdo.tests.legacy.model5.GenListOfIntArray
+ * @generated
+ */
+ EClass getGenListOfIntArray();
+
+ /**
+ * Returns the meta object for the attribute list '
+ * {@link org.eclipse.emf.cdo.tests.legacy.model5.GenListOfIntArray#getElements <em>Elements</em>}'. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for the attribute list '<em>Elements</em>'.
+ * @see org.eclipse.emf.cdo.tests.legacy.model5.GenListOfIntArray#getElements()
+ * @see #getGenListOfIntArray()
+ * @generated
+ */
+ EAttribute getGenListOfIntArray_Elements();
+
+ /**
+ * Returns the meta object for data type '<em>Int Array</em>'. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for data type '<em>Int Array</em>'.
+ * @model instanceClass="int[]"
+ * @generated
+ */
+ EDataType getIntArray();
+
+ /**
* Returns the factory that creates the instances of the model. <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @return the factory that creates the instances of the model.
@@ -957,6 +1024,32 @@ public interface Model5Package extends org.eclipse.emf.cdo.tests.model5.Model5Pa
*/
EAttribute GEN_LIST_OF_CHAR__ELEMENTS = eINSTANCE.getGenListOfChar_Elements();
+ /**
+ * The meta object literal for the '{@link org.eclipse.emf.cdo.tests.legacy.model5.impl.GenListOfIntArrayImpl
+ * <em>Gen List Of Int Array</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see org.eclipse.emf.cdo.tests.legacy.model5.impl.GenListOfIntArrayImpl
+ * @see org.eclipse.emf.cdo.tests.legacy.model5.impl.Model5PackageImpl#getGenListOfIntArray()
+ * @generated
+ */
+ EClass GEN_LIST_OF_INT_ARRAY = eINSTANCE.getGenListOfIntArray();
+
+ /**
+ * The meta object literal for the '<em><b>Elements</b></em>' attribute list feature. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ EAttribute GEN_LIST_OF_INT_ARRAY__ELEMENTS = eINSTANCE.getGenListOfIntArray_Elements();
+
+ /**
+ * The meta object literal for the '<em>Int Array</em>' data type. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see org.eclipse.emf.cdo.tests.legacy.model5.impl.Model5PackageImpl#getIntArray()
+ * @generated
+ */
+ EDataType INT_ARRAY = eINSTANCE.getIntArray();
+
}
} // Model5Package
diff --git a/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/legacy/model5/impl/GenListOfBooleanImpl.java b/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/legacy/model5/impl/GenListOfBooleanImpl.java
index 5bce3dc272..1bbda6a305 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/legacy/model5/impl/GenListOfBooleanImpl.java
+++ b/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/legacy/model5/impl/GenListOfBooleanImpl.java
@@ -163,9 +163,7 @@ public class GenListOfBooleanImpl extends EObjectImpl implements GenListOfBoolea
public String toString()
{
if (eIsProxy())
- {
return super.toString();
- }
StringBuffer result = new StringBuffer(super.toString());
result.append(" (elements: ");
diff --git a/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/legacy/model5/impl/GenListOfCharImpl.java b/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/legacy/model5/impl/GenListOfCharImpl.java
index ef363edd8a..b4d7726ea1 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/legacy/model5/impl/GenListOfCharImpl.java
+++ b/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/legacy/model5/impl/GenListOfCharImpl.java
@@ -163,9 +163,7 @@ public class GenListOfCharImpl extends EObjectImpl implements GenListOfChar
public String toString()
{
if (eIsProxy())
- {
return super.toString();
- }
StringBuffer result = new StringBuffer(super.toString());
result.append(" (elements: ");
diff --git a/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/legacy/model5/impl/GenListOfDateImpl.java b/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/legacy/model5/impl/GenListOfDateImpl.java
index 9a975bb6e8..3869b7d6aa 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/legacy/model5/impl/GenListOfDateImpl.java
+++ b/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/legacy/model5/impl/GenListOfDateImpl.java
@@ -164,9 +164,7 @@ public class GenListOfDateImpl extends EObjectImpl implements GenListOfDate
public String toString()
{
if (eIsProxy())
- {
return super.toString();
- }
StringBuffer result = new StringBuffer(super.toString());
result.append(" (elements: ");
diff --git a/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/legacy/model5/impl/GenListOfDoubleImpl.java b/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/legacy/model5/impl/GenListOfDoubleImpl.java
index 37b965402a..74971fdb55 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/legacy/model5/impl/GenListOfDoubleImpl.java
+++ b/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/legacy/model5/impl/GenListOfDoubleImpl.java
@@ -163,9 +163,7 @@ public class GenListOfDoubleImpl extends EObjectImpl implements GenListOfDouble
public String toString()
{
if (eIsProxy())
- {
return super.toString();
- }
StringBuffer result = new StringBuffer(super.toString());
result.append(" (elements: ");
diff --git a/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/legacy/model5/impl/GenListOfFloatImpl.java b/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/legacy/model5/impl/GenListOfFloatImpl.java
index 8fedcc89cf..a8f7b5823b 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/legacy/model5/impl/GenListOfFloatImpl.java
+++ b/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/legacy/model5/impl/GenListOfFloatImpl.java
@@ -163,9 +163,7 @@ public class GenListOfFloatImpl extends EObjectImpl implements GenListOfFloat
public String toString()
{
if (eIsProxy())
- {
return super.toString();
- }
StringBuffer result = new StringBuffer(super.toString());
result.append(" (elements: ");
diff --git a/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/legacy/model5/impl/GenListOfIntArrayImpl.java b/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/legacy/model5/impl/GenListOfIntArrayImpl.java
new file mode 100644
index 0000000000..fd065c00fe
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/legacy/model5/impl/GenListOfIntArrayImpl.java
@@ -0,0 +1,175 @@
+/**
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany) and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Eike Stepper - initial API and implementation
+ */
+package org.eclipse.emf.cdo.tests.legacy.model5.impl;
+
+import org.eclipse.emf.cdo.tests.legacy.model5.Model5Package;
+import org.eclipse.emf.cdo.tests.model5.GenListOfIntArray;
+
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.impl.EObjectImpl;
+import org.eclipse.emf.ecore.util.EDataTypeUniqueEList;
+
+import java.util.Collection;
+
+/**
+ * <!-- begin-user-doc --> An implementation of the model object '<em><b>Gen List Of Int Array</b></em>'. <!--
+ * end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.emf.cdo.tests.legacy.model5.impl.GenListOfIntArrayImpl#getElements <em>Elements</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class GenListOfIntArrayImpl extends EObjectImpl implements GenListOfIntArray
+{
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public static final String copyright = "Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany) and others.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n\r\nContributors:\r\n Eike Stepper - initial API and implementation";
+
+ /**
+ * The cached value of the '{@link #getElements() <em>Elements</em>}' attribute list. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @see #getElements()
+ * @generated
+ * @ordered
+ */
+ protected EList<int[]> elements;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected GenListOfIntArrayImpl()
+ {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass()
+ {
+ return Model5Package.Literals.GEN_LIST_OF_INT_ARRAY;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EList<int[]> getElements()
+ {
+ if (elements == null)
+ {
+ elements = new EDataTypeUniqueEList<int[]>(int[].class, this, Model5Package.GEN_LIST_OF_INT_ARRAY__ELEMENTS);
+ }
+ return elements;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType)
+ {
+ switch (featureID)
+ {
+ case Model5Package.GEN_LIST_OF_INT_ARRAY__ELEMENTS:
+ return getElements();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public void eSet(int featureID, Object newValue)
+ {
+ switch (featureID)
+ {
+ case Model5Package.GEN_LIST_OF_INT_ARRAY__ELEMENTS:
+ getElements().clear();
+ getElements().addAll((Collection<? extends int[]>)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID)
+ {
+ switch (featureID)
+ {
+ case Model5Package.GEN_LIST_OF_INT_ARRAY__ELEMENTS:
+ getElements().clear();
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID)
+ {
+ switch (featureID)
+ {
+ case Model5Package.GEN_LIST_OF_INT_ARRAY__ELEMENTS:
+ return elements != null && !elements.isEmpty();
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public String toString()
+ {
+ if (eIsProxy())
+ return super.toString();
+
+ StringBuffer result = new StringBuffer(super.toString());
+ result.append(" (elements: ");
+ result.append(elements);
+ result.append(')');
+ return result.toString();
+ }
+
+} // GenListOfIntArrayImpl
diff --git a/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/legacy/model5/impl/GenListOfIntImpl.java b/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/legacy/model5/impl/GenListOfIntImpl.java
index e3dc5a9ea6..c5f5bb29ac 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/legacy/model5/impl/GenListOfIntImpl.java
+++ b/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/legacy/model5/impl/GenListOfIntImpl.java
@@ -163,9 +163,7 @@ public class GenListOfIntImpl extends EObjectImpl implements GenListOfInt
public String toString()
{
if (eIsProxy())
- {
return super.toString();
- }
StringBuffer result = new StringBuffer(super.toString());
result.append(" (elements: ");
diff --git a/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/legacy/model5/impl/GenListOfIntegerImpl.java b/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/legacy/model5/impl/GenListOfIntegerImpl.java
index 6c5c329139..c1c56c9562 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/legacy/model5/impl/GenListOfIntegerImpl.java
+++ b/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/legacy/model5/impl/GenListOfIntegerImpl.java
@@ -163,9 +163,7 @@ public class GenListOfIntegerImpl extends EObjectImpl implements GenListOfIntege
public String toString()
{
if (eIsProxy())
- {
return super.toString();
- }
StringBuffer result = new StringBuffer(super.toString());
result.append(" (elements: ");
diff --git a/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/legacy/model5/impl/GenListOfLongImpl.java b/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/legacy/model5/impl/GenListOfLongImpl.java
index 1fb6f8c817..30f78761e4 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/legacy/model5/impl/GenListOfLongImpl.java
+++ b/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/legacy/model5/impl/GenListOfLongImpl.java
@@ -163,9 +163,7 @@ public class GenListOfLongImpl extends EObjectImpl implements GenListOfLong
public String toString()
{
if (eIsProxy())
- {
return super.toString();
- }
StringBuffer result = new StringBuffer(super.toString());
result.append(" (elements: ");
diff --git a/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/legacy/model5/impl/GenListOfShortImpl.java b/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/legacy/model5/impl/GenListOfShortImpl.java
index 3ab8cf5b29..12499fb882 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/legacy/model5/impl/GenListOfShortImpl.java
+++ b/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/legacy/model5/impl/GenListOfShortImpl.java
@@ -163,9 +163,7 @@ public class GenListOfShortImpl extends EObjectImpl implements GenListOfShort
public String toString()
{
if (eIsProxy())
- {
return super.toString();
- }
StringBuffer result = new StringBuffer(super.toString());
result.append(" (elements: ");
diff --git a/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/legacy/model5/impl/GenListOfStringImpl.java b/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/legacy/model5/impl/GenListOfStringImpl.java
index d1c75a7edb..66502cb903 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/legacy/model5/impl/GenListOfStringImpl.java
+++ b/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/legacy/model5/impl/GenListOfStringImpl.java
@@ -163,9 +163,7 @@ public class GenListOfStringImpl extends EObjectImpl implements GenListOfString
public String toString()
{
if (eIsProxy())
- {
return super.toString();
- }
StringBuffer result = new StringBuffer(super.toString());
result.append(" (elements: ");
diff --git a/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/legacy/model5/impl/Model5FactoryImpl.java b/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/legacy/model5/impl/Model5FactoryImpl.java
index 55e57107ad..db7262cffe 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/legacy/model5/impl/Model5FactoryImpl.java
+++ b/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/legacy/model5/impl/Model5FactoryImpl.java
@@ -19,6 +19,7 @@ import org.eclipse.emf.cdo.tests.model5.GenListOfDate;
import org.eclipse.emf.cdo.tests.model5.GenListOfDouble;
import org.eclipse.emf.cdo.tests.model5.GenListOfFloat;
import org.eclipse.emf.cdo.tests.model5.GenListOfInt;
+import org.eclipse.emf.cdo.tests.model5.GenListOfIntArray;
import org.eclipse.emf.cdo.tests.model5.GenListOfInteger;
import org.eclipse.emf.cdo.tests.model5.GenListOfLong;
import org.eclipse.emf.cdo.tests.model5.GenListOfShort;
@@ -27,6 +28,7 @@ import org.eclipse.emf.cdo.tests.model5.Manager;
import org.eclipse.emf.cdo.tests.model5.TestFeatureMap;
import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EDataType;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.impl.EFactoryImpl;
@@ -115,6 +117,8 @@ public class Model5FactoryImpl extends EFactoryImpl implements Model5Factory
return createGenListOfDate();
case Model5Package.GEN_LIST_OF_CHAR:
return createGenListOfChar();
+ case Model5Package.GEN_LIST_OF_INT_ARRAY:
+ return createGenListOfIntArray();
default:
throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
}
@@ -125,6 +129,40 @@ public class Model5FactoryImpl extends EFactoryImpl implements Model5Factory
*
* @generated
*/
+ @Override
+ public Object createFromString(EDataType eDataType, String initialValue)
+ {
+ switch (eDataType.getClassifierID())
+ {
+ case Model5Package.INT_ARRAY:
+ return createIntArrayFromString(eDataType, initialValue);
+ default:
+ throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public String convertToString(EDataType eDataType, Object instanceValue)
+ {
+ switch (eDataType.getClassifierID())
+ {
+ case Model5Package.INT_ARRAY:
+ return convertIntArrayToString(eDataType, instanceValue);
+ default:
+ throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
public TestFeatureMap createTestFeatureMap()
{
TestFeatureMapImpl testFeatureMap = new TestFeatureMapImpl();
@@ -268,6 +306,37 @@ public class Model5FactoryImpl extends EFactoryImpl implements Model5Factory
*
* @generated
*/
+ public GenListOfIntArray createGenListOfIntArray()
+ {
+ GenListOfIntArrayImpl genListOfIntArray = new GenListOfIntArrayImpl();
+ return genListOfIntArray;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public int[] createIntArrayFromString(EDataType eDataType, String initialValue)
+ {
+ return (int[])super.createFromString(initialValue);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public String convertIntArrayToString(EDataType eDataType, Object instanceValue)
+ {
+ return super.convertToString(instanceValue);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
public Model5Package getModel5Package()
{
return (Model5Package)getEPackage();
diff --git a/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/legacy/model5/impl/Model5PackageImpl.java b/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/legacy/model5/impl/Model5PackageImpl.java
index 0a671ec253..39fa4684f6 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/legacy/model5/impl/Model5PackageImpl.java
+++ b/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/legacy/model5/impl/Model5PackageImpl.java
@@ -19,6 +19,7 @@ import org.eclipse.emf.cdo.tests.model5.GenListOfDate;
import org.eclipse.emf.cdo.tests.model5.GenListOfDouble;
import org.eclipse.emf.cdo.tests.model5.GenListOfFloat;
import org.eclipse.emf.cdo.tests.model5.GenListOfInt;
+import org.eclipse.emf.cdo.tests.model5.GenListOfIntArray;
import org.eclipse.emf.cdo.tests.model5.GenListOfInteger;
import org.eclipse.emf.cdo.tests.model5.GenListOfLong;
import org.eclipse.emf.cdo.tests.model5.GenListOfShort;
@@ -28,6 +29,7 @@ import org.eclipse.emf.cdo.tests.model5.TestFeatureMap;
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EDataType;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.impl.EPackageImpl;
@@ -138,6 +140,20 @@ public class Model5PackageImpl extends EPackageImpl implements Model5Package
private EClass genListOfCharEClass = null;
/**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private EClass genListOfIntArrayEClass = null;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private EDataType intArrayEDataType = null;
+
+ /**
* Creates an instance of the model <b>Package</b>, registered with {@link org.eclipse.emf.ecore.EPackage.Registry
* EPackage.Registry} by the package package URI value.
* <p>
@@ -177,14 +193,11 @@ public class Model5PackageImpl extends EPackageImpl implements Model5Package
public static Model5Package init()
{
if (isInited)
- {
return (Model5Package)EPackage.Registry.INSTANCE.getEPackage(Model5Package.eNS_URI);
- }
// Obtain or create and register package
Model5PackageImpl theModel5Package = (Model5PackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof Model5PackageImpl ? EPackage.Registry.INSTANCE
- .get(eNS_URI)
- : new Model5PackageImpl());
+ .get(eNS_URI) : new Model5PackageImpl());
isInited = true;
@@ -467,6 +480,36 @@ public class Model5PackageImpl extends EPackageImpl implements Model5Package
*
* @generated
*/
+ public EClass getGenListOfIntArray()
+ {
+ return genListOfIntArrayEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EAttribute getGenListOfIntArray_Elements()
+ {
+ return (EAttribute)genListOfIntArrayEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EDataType getIntArray()
+ {
+ return intArrayEDataType;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
public Model5Factory getModel5Factory()
{
return (Model5Factory)getEFactoryInstance();
@@ -488,9 +531,7 @@ public class Model5PackageImpl extends EPackageImpl implements Model5Package
public void createPackageContents()
{
if (isCreated)
- {
return;
- }
isCreated = true;
// Create classes and their features
@@ -532,6 +573,12 @@ public class Model5PackageImpl extends EPackageImpl implements Model5Package
genListOfCharEClass = createEClass(GEN_LIST_OF_CHAR);
createEAttribute(genListOfCharEClass, GEN_LIST_OF_CHAR__ELEMENTS);
+
+ genListOfIntArrayEClass = createEClass(GEN_LIST_OF_INT_ARRAY);
+ createEAttribute(genListOfIntArrayEClass, GEN_LIST_OF_INT_ARRAY__ELEMENTS);
+
+ // Create data types
+ intArrayEDataType = createEDataType(INT_ARRAY);
}
/**
@@ -550,9 +597,7 @@ public class Model5PackageImpl extends EPackageImpl implements Model5Package
public void initializePackageContents()
{
if (isInitialized)
- {
return;
- }
isInitialized = true;
// Initialize package
@@ -569,10 +614,10 @@ public class Model5PackageImpl extends EPackageImpl implements Model5Package
// Initialize classes and features; add operations and parameters
initEClass(testFeatureMapEClass, TestFeatureMap.class, "TestFeatureMap", !IS_ABSTRACT, !IS_INTERFACE,
IS_GENERATED_INSTANCE_CLASS);
- initEReference(getTestFeatureMap_Managers(), getManager(), null, "managers", null, 0, -1, TestFeatureMap.class,
- IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE,
- !IS_DERIVED, IS_ORDERED);
- initEReference(getTestFeatureMap_Doctors(), getDoctor(), null, "doctors", null, 0, -1, TestFeatureMap.class,
+ initEReference(getTestFeatureMap_Managers(), this.getManager(), null, "managers", null, 0, -1,
+ TestFeatureMap.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES,
+ !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getTestFeatureMap_Doctors(), this.getDoctor(), null, "doctors", null, 0, -1, TestFeatureMap.class,
IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE,
!IS_DERIVED, IS_ORDERED);
initEAttribute(getTestFeatureMap_People(), ecorePackage.getEFeatureMapEntry(), "people", null, 0, -1,
@@ -639,6 +684,15 @@ public class Model5PackageImpl extends EPackageImpl implements Model5Package
initEAttribute(getGenListOfChar_Elements(), ecorePackage.getEChar(), "elements", null, 0, -1, GenListOfChar.class,
!IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEClass(genListOfIntArrayEClass, GenListOfIntArray.class, "GenListOfIntArray", !IS_ABSTRACT, !IS_INTERFACE,
+ IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getGenListOfIntArray_Elements(), this.getIntArray(), "elements", null, 0, -1,
+ GenListOfIntArray.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE,
+ !IS_DERIVED, IS_ORDERED);
+
+ // Initialize data types
+ initEDataType(intArrayEDataType, int[].class, "IntArray", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS);
+
// Create resource
createResource(eNS_URI);
diff --git a/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/legacy/model5/impl/TestFeatureMapImpl.java b/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/legacy/model5/impl/TestFeatureMapImpl.java
index 970cb927e5..7cb052acc5 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/legacy/model5/impl/TestFeatureMapImpl.java
+++ b/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/legacy/model5/impl/TestFeatureMapImpl.java
@@ -178,9 +178,7 @@ public class TestFeatureMapImpl extends EObjectImpl implements TestFeatureMap
return getDoctors();
case Model5Package.TEST_FEATURE_MAP__PEOPLE:
if (coreType)
- {
return getPeople();
- }
return ((FeatureMap.Internal)getPeople()).getWrapper();
}
return super.eGet(featureID, resolve, coreType);
@@ -264,9 +262,7 @@ public class TestFeatureMapImpl extends EObjectImpl implements TestFeatureMap
public String toString()
{
if (eIsProxy())
- {
return super.toString();
- }
StringBuffer result = new StringBuffer(super.toString());
result.append(" (people: ");
diff --git a/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/legacy/model5/util/Model5AdapterFactory.java b/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/legacy/model5/util/Model5AdapterFactory.java
index 65a768a995..5ee852ce92 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/legacy/model5/util/Model5AdapterFactory.java
+++ b/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/legacy/model5/util/Model5AdapterFactory.java
@@ -18,6 +18,7 @@ import org.eclipse.emf.cdo.tests.model5.GenListOfDate;
import org.eclipse.emf.cdo.tests.model5.GenListOfDouble;
import org.eclipse.emf.cdo.tests.model5.GenListOfFloat;
import org.eclipse.emf.cdo.tests.model5.GenListOfInt;
+import org.eclipse.emf.cdo.tests.model5.GenListOfIntArray;
import org.eclipse.emf.cdo.tests.model5.GenListOfInteger;
import org.eclipse.emf.cdo.tests.model5.GenListOfLong;
import org.eclipse.emf.cdo.tests.model5.GenListOfShort;
@@ -174,6 +175,12 @@ public class Model5AdapterFactory extends AdapterFactoryImpl
}
@Override
+ public Adapter caseGenListOfIntArray(GenListOfIntArray object)
+ {
+ return createGenListOfIntArrayAdapter();
+ }
+
+ @Override
public Adapter defaultCase(EObject object)
{
return createEObjectAdapter();
@@ -383,6 +390,21 @@ public class Model5AdapterFactory extends AdapterFactoryImpl
}
/**
+ * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.tests.legacy.model5.GenListOfIntArray
+ * <em>Gen List Of Int Array</em>}'. <!-- begin-user-doc --> This default implementation returns null so that we can
+ * easily ignore cases; it's useful to ignore a case when inheritance will catch all the cases anyway. <!--
+ * end-user-doc -->
+ *
+ * @return the new adapter.
+ * @see org.eclipse.emf.cdo.tests.legacy.model5.GenListOfIntArray
+ * @generated
+ */
+ public Adapter createGenListOfIntArrayAdapter()
+ {
+ return null;
+ }
+
+ /**
* Creates a new adapter for the default case. <!-- begin-user-doc --> This default implementation returns null. <!--
* end-user-doc -->
*
diff --git a/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/legacy/model5/util/Model5Switch.java b/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/legacy/model5/util/Model5Switch.java
index d2d594d41c..31492eda4b 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/legacy/model5/util/Model5Switch.java
+++ b/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/legacy/model5/util/Model5Switch.java
@@ -18,6 +18,7 @@ import org.eclipse.emf.cdo.tests.model5.GenListOfDate;
import org.eclipse.emf.cdo.tests.model5.GenListOfDouble;
import org.eclipse.emf.cdo.tests.model5.GenListOfFloat;
import org.eclipse.emf.cdo.tests.model5.GenListOfInt;
+import org.eclipse.emf.cdo.tests.model5.GenListOfIntArray;
import org.eclipse.emf.cdo.tests.model5.GenListOfInteger;
import org.eclipse.emf.cdo.tests.model5.GenListOfLong;
import org.eclipse.emf.cdo.tests.model5.GenListOfShort;
@@ -116,9 +117,7 @@ public class Model5Switch<T>
TestFeatureMap testFeatureMap = (TestFeatureMap)theEObject;
T result = caseTestFeatureMap(testFeatureMap);
if (result == null)
- {
result = defaultCase(theEObject);
- }
return result;
}
case Model5Package.MANAGER:
@@ -126,9 +125,7 @@ public class Model5Switch<T>
Manager manager = (Manager)theEObject;
T result = caseManager(manager);
if (result == null)
- {
result = defaultCase(theEObject);
- }
return result;
}
case Model5Package.DOCTOR:
@@ -136,9 +133,7 @@ public class Model5Switch<T>
Doctor doctor = (Doctor)theEObject;
T result = caseDoctor(doctor);
if (result == null)
- {
result = defaultCase(theEObject);
- }
return result;
}
case Model5Package.GEN_LIST_OF_STRING:
@@ -146,9 +141,7 @@ public class Model5Switch<T>
GenListOfString genListOfString = (GenListOfString)theEObject;
T result = caseGenListOfString(genListOfString);
if (result == null)
- {
result = defaultCase(theEObject);
- }
return result;
}
case Model5Package.GEN_LIST_OF_INT:
@@ -156,9 +149,7 @@ public class Model5Switch<T>
GenListOfInt genListOfInt = (GenListOfInt)theEObject;
T result = caseGenListOfInt(genListOfInt);
if (result == null)
- {
result = defaultCase(theEObject);
- }
return result;
}
case Model5Package.GEN_LIST_OF_INTEGER:
@@ -166,9 +157,7 @@ public class Model5Switch<T>
GenListOfInteger genListOfInteger = (GenListOfInteger)theEObject;
T result = caseGenListOfInteger(genListOfInteger);
if (result == null)
- {
result = defaultCase(theEObject);
- }
return result;
}
case Model5Package.GEN_LIST_OF_LONG:
@@ -176,9 +165,7 @@ public class Model5Switch<T>
GenListOfLong genListOfLong = (GenListOfLong)theEObject;
T result = caseGenListOfLong(genListOfLong);
if (result == null)
- {
result = defaultCase(theEObject);
- }
return result;
}
case Model5Package.GEN_LIST_OF_BOOLEAN:
@@ -186,9 +173,7 @@ public class Model5Switch<T>
GenListOfBoolean genListOfBoolean = (GenListOfBoolean)theEObject;
T result = caseGenListOfBoolean(genListOfBoolean);
if (result == null)
- {
result = defaultCase(theEObject);
- }
return result;
}
case Model5Package.GEN_LIST_OF_SHORT:
@@ -196,9 +181,7 @@ public class Model5Switch<T>
GenListOfShort genListOfShort = (GenListOfShort)theEObject;
T result = caseGenListOfShort(genListOfShort);
if (result == null)
- {
result = defaultCase(theEObject);
- }
return result;
}
case Model5Package.GEN_LIST_OF_FLOAT:
@@ -206,9 +189,7 @@ public class Model5Switch<T>
GenListOfFloat genListOfFloat = (GenListOfFloat)theEObject;
T result = caseGenListOfFloat(genListOfFloat);
if (result == null)
- {
result = defaultCase(theEObject);
- }
return result;
}
case Model5Package.GEN_LIST_OF_DOUBLE:
@@ -216,9 +197,7 @@ public class Model5Switch<T>
GenListOfDouble genListOfDouble = (GenListOfDouble)theEObject;
T result = caseGenListOfDouble(genListOfDouble);
if (result == null)
- {
result = defaultCase(theEObject);
- }
return result;
}
case Model5Package.GEN_LIST_OF_DATE:
@@ -226,9 +205,7 @@ public class Model5Switch<T>
GenListOfDate genListOfDate = (GenListOfDate)theEObject;
T result = caseGenListOfDate(genListOfDate);
if (result == null)
- {
result = defaultCase(theEObject);
- }
return result;
}
case Model5Package.GEN_LIST_OF_CHAR:
@@ -236,9 +213,15 @@ public class Model5Switch<T>
GenListOfChar genListOfChar = (GenListOfChar)theEObject;
T result = caseGenListOfChar(genListOfChar);
if (result == null)
- {
result = defaultCase(theEObject);
- }
+ return result;
+ }
+ case Model5Package.GEN_LIST_OF_INT_ARRAY:
+ {
+ GenListOfIntArray genListOfIntArray = (GenListOfIntArray)theEObject;
+ T result = caseGenListOfIntArray(genListOfIntArray);
+ if (result == null)
+ result = defaultCase(theEObject);
return result;
}
default:
@@ -442,6 +425,22 @@ public class Model5Switch<T>
}
/**
+ * Returns the result of interpreting the object as an instance of '<em>Gen List Of Int Array</em>'. <!--
+ * begin-user-doc --> This implementation returns null; returning a non-null result will terminate the switch. <!--
+ * end-user-doc -->
+ *
+ * @param object
+ * the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Gen List Of Int Array</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseGenListOfIntArray(GenListOfIntArray object)
+ {
+ return null;
+ }
+
+ /**
* Returns the result of interpreting the object as an instance of '<em>EObject</em>'. <!-- begin-user-doc --> This
* implementation returns null; returning a non-null result will terminate the switch, but this is the last case
* anyway. <!-- end-user-doc -->
diff --git a/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/GenListOfIntArray.java b/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/GenListOfIntArray.java
new file mode 100644
index 0000000000..0e622a4662
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/GenListOfIntArray.java
@@ -0,0 +1,55 @@
+/**
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany) and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Eike Stepper - initial API and implementation
+ */
+package org.eclipse.emf.cdo.tests.model5;
+
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * <!-- begin-user-doc --> A representation of the model object '<em><b>Gen List Of Int Array</b></em>'. <!--
+ * end-user-doc -->
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.emf.cdo.tests.model5.GenListOfIntArray#getElements <em>Elements</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.emf.cdo.tests.model5.Model5Package#getGenListOfIntArray()
+ * @model
+ * @generated
+ */
+public interface GenListOfIntArray extends EObject
+{
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ String copyright = "Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany) and others.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n\r\nContributors:\r\n Eike Stepper - initial API and implementation";
+
+ /**
+ * Returns the value of the '<em><b>Elements</b></em>' attribute list. The list contents are of type {@link int}[].
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Elements</em>' attribute list isn't clear, there really should be more of a description
+ * here...
+ * </p>
+ * <!-- end-user-doc -->
+ *
+ * @return the value of the '<em>Elements</em>' attribute list.
+ * @see org.eclipse.emf.cdo.tests.model5.Model5Package#getGenListOfIntArray_Elements()
+ * @model dataType="org.eclipse.emf.cdo.tests.model5.IntArray"
+ * @generated
+ */
+ EList<int[]> getElements();
+
+} // GenListOfIntArray
diff --git a/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/Model5Factory.java b/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/Model5Factory.java
index 31382d6c84..980db061e0 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/Model5Factory.java
+++ b/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/Model5Factory.java
@@ -132,6 +132,14 @@ public interface Model5Factory extends EFactory
GenListOfChar createGenListOfChar();
/**
+ * Returns a new object of class '<em>Gen List Of Int Array</em>'. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return a new object of class '<em>Gen List Of Int Array</em>'.
+ * @generated
+ */
+ GenListOfIntArray createGenListOfIntArray();
+
+ /**
* Returns a new object of class '<em>Gen List Of String</em>'. <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @return a new object of class '<em>Gen List Of String</em>'.
diff --git a/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/Model5Package.java b/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/Model5Package.java
index 5a83889353..42a4c51672 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/Model5Package.java
+++ b/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/Model5Package.java
@@ -12,6 +12,7 @@ package org.eclipse.emf.cdo.tests.model5;
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EDataType;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.EReference;
@@ -417,6 +418,41 @@ public interface Model5Package extends EPackage
int GEN_LIST_OF_CHAR_FEATURE_COUNT = 1;
/**
+ * The meta object id for the '{@link org.eclipse.emf.cdo.tests.model5.impl.GenListOfIntArrayImpl
+ * <em>Gen List Of Int Array</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see org.eclipse.emf.cdo.tests.model5.impl.GenListOfIntArrayImpl
+ * @see org.eclipse.emf.cdo.tests.model5.impl.Model5PackageImpl#getGenListOfIntArray()
+ * @generated
+ */
+ int GEN_LIST_OF_INT_ARRAY = 13;
+
+ /**
+ * The feature id for the '<em><b>Elements</b></em>' attribute list. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int GEN_LIST_OF_INT_ARRAY__ELEMENTS = 0;
+
+ /**
+ * The number of structural features of the '<em>Gen List Of Int Array</em>' class. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int GEN_LIST_OF_INT_ARRAY_FEATURE_COUNT = 1;
+
+ /**
+ * The meta object id for the '<em>Int Array</em>' data type. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see org.eclipse.emf.cdo.tests.model5.impl.Model5PackageImpl#getIntArray()
+ * @generated
+ */
+ int INT_ARRAY = 14;
+
+ /**
* Returns the meta object for class '{@link org.eclipse.emf.cdo.tests.model5.TestFeatureMap
* <em>Test Feature Map</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
*
@@ -673,6 +709,37 @@ public interface Model5Package extends EPackage
EAttribute getGenListOfChar_Elements();
/**
+ * Returns the meta object for class '{@link org.eclipse.emf.cdo.tests.model5.GenListOfIntArray
+ * <em>Gen List Of Int Array</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for class '<em>Gen List Of Int Array</em>'.
+ * @see org.eclipse.emf.cdo.tests.model5.GenListOfIntArray
+ * @generated
+ */
+ EClass getGenListOfIntArray();
+
+ /**
+ * Returns the meta object for the attribute list '
+ * {@link org.eclipse.emf.cdo.tests.model5.GenListOfIntArray#getElements <em>Elements</em>}'. <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @return the meta object for the attribute list '<em>Elements</em>'.
+ * @see org.eclipse.emf.cdo.tests.model5.GenListOfIntArray#getElements()
+ * @see #getGenListOfIntArray()
+ * @generated
+ */
+ EAttribute getGenListOfIntArray_Elements();
+
+ /**
+ * Returns the meta object for data type '<em>Int Array</em>'. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for data type '<em>Int Array</em>'.
+ * @model instanceClass="int[]"
+ * @generated
+ */
+ EDataType getIntArray();
+
+ /**
* Returns the meta object for class '{@link org.eclipse.emf.cdo.tests.model5.GenListOfString
* <em>Gen List Of String</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
*
@@ -933,6 +1000,32 @@ public interface Model5Package extends EPackage
EAttribute GEN_LIST_OF_CHAR__ELEMENTS = eINSTANCE.getGenListOfChar_Elements();
/**
+ * The meta object literal for the '{@link org.eclipse.emf.cdo.tests.model5.impl.GenListOfIntArrayImpl
+ * <em>Gen List Of Int Array</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see org.eclipse.emf.cdo.tests.model5.impl.GenListOfIntArrayImpl
+ * @see org.eclipse.emf.cdo.tests.model5.impl.Model5PackageImpl#getGenListOfIntArray()
+ * @generated
+ */
+ EClass GEN_LIST_OF_INT_ARRAY = eINSTANCE.getGenListOfIntArray();
+
+ /**
+ * The meta object literal for the '<em><b>Elements</b></em>' attribute list feature. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ EAttribute GEN_LIST_OF_INT_ARRAY__ELEMENTS = eINSTANCE.getGenListOfIntArray_Elements();
+
+ /**
+ * The meta object literal for the '<em>Int Array</em>' data type. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see org.eclipse.emf.cdo.tests.model5.impl.Model5PackageImpl#getIntArray()
+ * @generated
+ */
+ EDataType INT_ARRAY = eINSTANCE.getIntArray();
+
+ /**
* The meta object literal for the '{@link org.eclipse.emf.cdo.tests.model5.impl.GenListOfStringImpl
* <em>Gen List Of String</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc -->
*
diff --git a/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/impl/GenListOfIntArrayImpl.java b/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/impl/GenListOfIntArrayImpl.java
new file mode 100644
index 0000000000..b8742f56d7
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/impl/GenListOfIntArrayImpl.java
@@ -0,0 +1,85 @@
+/**
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany) and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Eike Stepper - initial API and implementation
+ */
+package org.eclipse.emf.cdo.tests.model5.impl;
+
+import org.eclipse.emf.cdo.tests.model5.GenListOfIntArray;
+import org.eclipse.emf.cdo.tests.model5.Model5Package;
+
+import org.eclipse.emf.internal.cdo.CDOObjectImpl;
+
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EClass;
+
+/**
+ * <!-- begin-user-doc --> An implementation of the model object '<em><b>Gen List Of Int Array</b></em>'. <!--
+ * end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.emf.cdo.tests.model5.impl.GenListOfIntArrayImpl#getElements <em>Elements</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class GenListOfIntArrayImpl extends CDOObjectImpl implements GenListOfIntArray
+{
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public static final String copyright = "Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany) and others.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n\r\nContributors:\r\n Eike Stepper - initial API and implementation";
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected GenListOfIntArrayImpl()
+ {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass()
+ {
+ return Model5Package.Literals.GEN_LIST_OF_INT_ARRAY;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected int eStaticFeatureCount()
+ {
+ return 0;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ public EList<int[]> getElements()
+ {
+ return (EList<int[]>)eGet(Model5Package.Literals.GEN_LIST_OF_INT_ARRAY__ELEMENTS, true);
+ }
+
+} // GenListOfIntArrayImpl
diff --git a/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/impl/Model5FactoryImpl.java b/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/impl/Model5FactoryImpl.java
index 929eebae89..24f983b2bf 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/impl/Model5FactoryImpl.java
+++ b/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/impl/Model5FactoryImpl.java
@@ -17,6 +17,7 @@ import org.eclipse.emf.cdo.tests.model5.GenListOfDate;
import org.eclipse.emf.cdo.tests.model5.GenListOfDouble;
import org.eclipse.emf.cdo.tests.model5.GenListOfFloat;
import org.eclipse.emf.cdo.tests.model5.GenListOfInt;
+import org.eclipse.emf.cdo.tests.model5.GenListOfIntArray;
import org.eclipse.emf.cdo.tests.model5.GenListOfInteger;
import org.eclipse.emf.cdo.tests.model5.GenListOfLong;
import org.eclipse.emf.cdo.tests.model5.GenListOfShort;
@@ -27,6 +28,7 @@ import org.eclipse.emf.cdo.tests.model5.Model5Package;
import org.eclipse.emf.cdo.tests.model5.TestFeatureMap;
import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EDataType;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.impl.EFactoryImpl;
@@ -115,6 +117,8 @@ public class Model5FactoryImpl extends EFactoryImpl implements Model5Factory
return createGenListOfDate();
case Model5Package.GEN_LIST_OF_CHAR:
return createGenListOfChar();
+ case Model5Package.GEN_LIST_OF_INT_ARRAY:
+ return createGenListOfIntArray();
default:
throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
}
@@ -125,6 +129,40 @@ public class Model5FactoryImpl extends EFactoryImpl implements Model5Factory
*
* @generated
*/
+ @Override
+ public Object createFromString(EDataType eDataType, String initialValue)
+ {
+ switch (eDataType.getClassifierID())
+ {
+ case Model5Package.INT_ARRAY:
+ return createIntArrayFromString(eDataType, initialValue);
+ default:
+ throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public String convertToString(EDataType eDataType, Object instanceValue)
+ {
+ switch (eDataType.getClassifierID())
+ {
+ case Model5Package.INT_ARRAY:
+ return convertIntArrayToString(eDataType, instanceValue);
+ default:
+ throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
public TestFeatureMap createTestFeatureMap()
{
TestFeatureMapImpl testFeatureMap = new TestFeatureMapImpl();
@@ -257,6 +295,37 @@ public class Model5FactoryImpl extends EFactoryImpl implements Model5Factory
*
* @generated
*/
+ public GenListOfIntArray createGenListOfIntArray()
+ {
+ GenListOfIntArrayImpl genListOfIntArray = new GenListOfIntArrayImpl();
+ return genListOfIntArray;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public int[] createIntArrayFromString(EDataType eDataType, String initialValue)
+ {
+ return (int[])super.createFromString(initialValue);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public String convertIntArrayToString(EDataType eDataType, Object instanceValue)
+ {
+ return super.convertToString(instanceValue);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
public GenListOfString createGenListOfString()
{
GenListOfStringImpl genListOfString = new GenListOfStringImpl();
diff --git a/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/impl/Model5PackageImpl.java b/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/impl/Model5PackageImpl.java
index 18572cb45b..2c36801400 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/impl/Model5PackageImpl.java
+++ b/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/impl/Model5PackageImpl.java
@@ -17,6 +17,7 @@ import org.eclipse.emf.cdo.tests.model5.GenListOfDate;
import org.eclipse.emf.cdo.tests.model5.GenListOfDouble;
import org.eclipse.emf.cdo.tests.model5.GenListOfFloat;
import org.eclipse.emf.cdo.tests.model5.GenListOfInt;
+import org.eclipse.emf.cdo.tests.model5.GenListOfIntArray;
import org.eclipse.emf.cdo.tests.model5.GenListOfInteger;
import org.eclipse.emf.cdo.tests.model5.GenListOfLong;
import org.eclipse.emf.cdo.tests.model5.GenListOfShort;
@@ -28,6 +29,7 @@ import org.eclipse.emf.cdo.tests.model5.TestFeatureMap;
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EDataType;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.impl.EPackageImpl;
@@ -135,6 +137,20 @@ public class Model5PackageImpl extends EPackageImpl implements Model5Package
*
* @generated
*/
+ private EClass genListOfIntArrayEClass = null;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private EDataType intArrayEDataType = null;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
private EClass genListOfStringEClass = null;
/**
@@ -177,14 +193,11 @@ public class Model5PackageImpl extends EPackageImpl implements Model5Package
public static Model5Package init()
{
if (isInited)
- {
return (Model5Package)EPackage.Registry.INSTANCE.getEPackage(Model5Package.eNS_URI);
- }
// Obtain or create and register package
Model5PackageImpl theModel5Package = (Model5PackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof Model5PackageImpl ? EPackage.Registry.INSTANCE
- .get(eNS_URI)
- : new Model5PackageImpl());
+ .get(eNS_URI) : new Model5PackageImpl());
isInited = true;
@@ -447,6 +460,36 @@ public class Model5PackageImpl extends EPackageImpl implements Model5Package
*
* @generated
*/
+ public EClass getGenListOfIntArray()
+ {
+ return genListOfIntArrayEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EAttribute getGenListOfIntArray_Elements()
+ {
+ return (EAttribute)genListOfIntArrayEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EDataType getIntArray()
+ {
+ return intArrayEDataType;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
public EClass getGenListOfString()
{
return genListOfStringEClass;
@@ -488,9 +531,7 @@ public class Model5PackageImpl extends EPackageImpl implements Model5Package
public void createPackageContents()
{
if (isCreated)
- {
return;
- }
isCreated = true;
// Create classes and their features
@@ -532,6 +573,12 @@ public class Model5PackageImpl extends EPackageImpl implements Model5Package
genListOfCharEClass = createEClass(GEN_LIST_OF_CHAR);
createEAttribute(genListOfCharEClass, GEN_LIST_OF_CHAR__ELEMENTS);
+
+ genListOfIntArrayEClass = createEClass(GEN_LIST_OF_INT_ARRAY);
+ createEAttribute(genListOfIntArrayEClass, GEN_LIST_OF_INT_ARRAY__ELEMENTS);
+
+ // Create data types
+ intArrayEDataType = createEDataType(INT_ARRAY);
}
/**
@@ -550,9 +597,7 @@ public class Model5PackageImpl extends EPackageImpl implements Model5Package
public void initializePackageContents()
{
if (isInitialized)
- {
return;
- }
isInitialized = true;
// Initialize package
@@ -569,10 +614,10 @@ public class Model5PackageImpl extends EPackageImpl implements Model5Package
// Initialize classes and features; add operations and parameters
initEClass(testFeatureMapEClass, TestFeatureMap.class, "TestFeatureMap", !IS_ABSTRACT, !IS_INTERFACE,
IS_GENERATED_INSTANCE_CLASS);
- initEReference(getTestFeatureMap_Managers(), getManager(), null, "managers", null, 0, -1, TestFeatureMap.class,
- IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE,
- !IS_DERIVED, IS_ORDERED);
- initEReference(getTestFeatureMap_Doctors(), getDoctor(), null, "doctors", null, 0, -1, TestFeatureMap.class,
+ initEReference(getTestFeatureMap_Managers(), this.getManager(), null, "managers", null, 0, -1,
+ TestFeatureMap.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES,
+ !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getTestFeatureMap_Doctors(), this.getDoctor(), null, "doctors", null, 0, -1, TestFeatureMap.class,
IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE,
!IS_DERIVED, IS_ORDERED);
initEAttribute(getTestFeatureMap_People(), ecorePackage.getEFeatureMapEntry(), "people", null, 0, -1,
@@ -639,6 +684,15 @@ public class Model5PackageImpl extends EPackageImpl implements Model5Package
initEAttribute(getGenListOfChar_Elements(), ecorePackage.getEChar(), "elements", null, 0, -1, GenListOfChar.class,
!IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEClass(genListOfIntArrayEClass, GenListOfIntArray.class, "GenListOfIntArray", !IS_ABSTRACT, !IS_INTERFACE,
+ IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getGenListOfIntArray_Elements(), this.getIntArray(), "elements", null, 0, -1,
+ GenListOfIntArray.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE,
+ !IS_DERIVED, IS_ORDERED);
+
+ // Initialize data types
+ initEDataType(intArrayEDataType, int[].class, "IntArray", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS);
+
// Create resource
createResource(eNS_URI);
diff --git a/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/util/Model5AdapterFactory.java b/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/util/Model5AdapterFactory.java
index 8c154c507f..9fb60db509 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/util/Model5AdapterFactory.java
+++ b/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/util/Model5AdapterFactory.java
@@ -17,6 +17,7 @@ import org.eclipse.emf.cdo.tests.model5.GenListOfDate;
import org.eclipse.emf.cdo.tests.model5.GenListOfDouble;
import org.eclipse.emf.cdo.tests.model5.GenListOfFloat;
import org.eclipse.emf.cdo.tests.model5.GenListOfInt;
+import org.eclipse.emf.cdo.tests.model5.GenListOfIntArray;
import org.eclipse.emf.cdo.tests.model5.GenListOfInteger;
import org.eclipse.emf.cdo.tests.model5.GenListOfLong;
import org.eclipse.emf.cdo.tests.model5.GenListOfShort;
@@ -174,6 +175,12 @@ public class Model5AdapterFactory extends AdapterFactoryImpl
}
@Override
+ public Adapter caseGenListOfIntArray(GenListOfIntArray object)
+ {
+ return createGenListOfIntArrayAdapter();
+ }
+
+ @Override
public Adapter defaultCase(EObject object)
{
return createEObjectAdapter();
@@ -368,6 +375,21 @@ public class Model5AdapterFactory extends AdapterFactoryImpl
}
/**
+ * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.tests.model5.GenListOfIntArray
+ * <em>Gen List Of Int Array</em>}'. <!-- begin-user-doc --> This default implementation returns null so that we can
+ * easily ignore cases; it's useful to ignore a case when inheritance will catch all the cases anyway. <!--
+ * end-user-doc -->
+ *
+ * @return the new adapter.
+ * @see org.eclipse.emf.cdo.tests.model5.GenListOfIntArray
+ * @generated
+ */
+ public Adapter createGenListOfIntArrayAdapter()
+ {
+ return null;
+ }
+
+ /**
* Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.tests.model5.GenListOfString
* <em>Gen List Of String</em>}'. <!-- begin-user-doc --> This default implementation returns null so that we can
* easily ignore cases; it's useful to ignore a case when inheritance will catch all the cases anyway. <!--
diff --git a/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/util/Model5Switch.java b/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/util/Model5Switch.java
index 802b101ff3..3900ea35b8 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/util/Model5Switch.java
+++ b/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/util/Model5Switch.java
@@ -17,6 +17,7 @@ import org.eclipse.emf.cdo.tests.model5.GenListOfDate;
import org.eclipse.emf.cdo.tests.model5.GenListOfDouble;
import org.eclipse.emf.cdo.tests.model5.GenListOfFloat;
import org.eclipse.emf.cdo.tests.model5.GenListOfInt;
+import org.eclipse.emf.cdo.tests.model5.GenListOfIntArray;
import org.eclipse.emf.cdo.tests.model5.GenListOfInteger;
import org.eclipse.emf.cdo.tests.model5.GenListOfLong;
import org.eclipse.emf.cdo.tests.model5.GenListOfShort;
@@ -116,9 +117,7 @@ public class Model5Switch<T>
TestFeatureMap testFeatureMap = (TestFeatureMap)theEObject;
T result = caseTestFeatureMap(testFeatureMap);
if (result == null)
- {
result = defaultCase(theEObject);
- }
return result;
}
case Model5Package.MANAGER:
@@ -126,9 +125,7 @@ public class Model5Switch<T>
Manager manager = (Manager)theEObject;
T result = caseManager(manager);
if (result == null)
- {
result = defaultCase(theEObject);
- }
return result;
}
case Model5Package.DOCTOR:
@@ -136,9 +133,7 @@ public class Model5Switch<T>
Doctor doctor = (Doctor)theEObject;
T result = caseDoctor(doctor);
if (result == null)
- {
result = defaultCase(theEObject);
- }
return result;
}
case Model5Package.GEN_LIST_OF_STRING:
@@ -146,9 +141,7 @@ public class Model5Switch<T>
GenListOfString genListOfString = (GenListOfString)theEObject;
T result = caseGenListOfString(genListOfString);
if (result == null)
- {
result = defaultCase(theEObject);
- }
return result;
}
case Model5Package.GEN_LIST_OF_INT:
@@ -156,9 +149,7 @@ public class Model5Switch<T>
GenListOfInt genListOfInt = (GenListOfInt)theEObject;
T result = caseGenListOfInt(genListOfInt);
if (result == null)
- {
result = defaultCase(theEObject);
- }
return result;
}
case Model5Package.GEN_LIST_OF_INTEGER:
@@ -166,9 +157,7 @@ public class Model5Switch<T>
GenListOfInteger genListOfInteger = (GenListOfInteger)theEObject;
T result = caseGenListOfInteger(genListOfInteger);
if (result == null)
- {
result = defaultCase(theEObject);
- }
return result;
}
case Model5Package.GEN_LIST_OF_LONG:
@@ -176,9 +165,7 @@ public class Model5Switch<T>
GenListOfLong genListOfLong = (GenListOfLong)theEObject;
T result = caseGenListOfLong(genListOfLong);
if (result == null)
- {
result = defaultCase(theEObject);
- }
return result;
}
case Model5Package.GEN_LIST_OF_BOOLEAN:
@@ -186,9 +173,7 @@ public class Model5Switch<T>
GenListOfBoolean genListOfBoolean = (GenListOfBoolean)theEObject;
T result = caseGenListOfBoolean(genListOfBoolean);
if (result == null)
- {
result = defaultCase(theEObject);
- }
return result;
}
case Model5Package.GEN_LIST_OF_SHORT:
@@ -196,9 +181,7 @@ public class Model5Switch<T>
GenListOfShort genListOfShort = (GenListOfShort)theEObject;
T result = caseGenListOfShort(genListOfShort);
if (result == null)
- {
result = defaultCase(theEObject);
- }
return result;
}
case Model5Package.GEN_LIST_OF_FLOAT:
@@ -206,9 +189,7 @@ public class Model5Switch<T>
GenListOfFloat genListOfFloat = (GenListOfFloat)theEObject;
T result = caseGenListOfFloat(genListOfFloat);
if (result == null)
- {
result = defaultCase(theEObject);
- }
return result;
}
case Model5Package.GEN_LIST_OF_DOUBLE:
@@ -216,9 +197,7 @@ public class Model5Switch<T>
GenListOfDouble genListOfDouble = (GenListOfDouble)theEObject;
T result = caseGenListOfDouble(genListOfDouble);
if (result == null)
- {
result = defaultCase(theEObject);
- }
return result;
}
case Model5Package.GEN_LIST_OF_DATE:
@@ -226,9 +205,7 @@ public class Model5Switch<T>
GenListOfDate genListOfDate = (GenListOfDate)theEObject;
T result = caseGenListOfDate(genListOfDate);
if (result == null)
- {
result = defaultCase(theEObject);
- }
return result;
}
case Model5Package.GEN_LIST_OF_CHAR:
@@ -236,9 +213,15 @@ public class Model5Switch<T>
GenListOfChar genListOfChar = (GenListOfChar)theEObject;
T result = caseGenListOfChar(genListOfChar);
if (result == null)
- {
result = defaultCase(theEObject);
- }
+ return result;
+ }
+ case Model5Package.GEN_LIST_OF_INT_ARRAY:
+ {
+ GenListOfIntArray genListOfIntArray = (GenListOfIntArray)theEObject;
+ T result = caseGenListOfIntArray(genListOfIntArray);
+ if (result == null)
+ result = defaultCase(theEObject);
return result;
}
default:
@@ -427,6 +410,22 @@ public class Model5Switch<T>
}
/**
+ * Returns the result of interpreting the object as an instance of '<em>Gen List Of Int Array</em>'. <!--
+ * begin-user-doc --> This implementation returns null; returning a non-null result will terminate the switch. <!--
+ * end-user-doc -->
+ *
+ * @param object
+ * the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Gen List Of Int Array</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseGenListOfIntArray(GenListOfIntArray object)
+ {
+ return null;
+ }
+
+ /**
* Returns the result of interpreting the object as an instance of '<em>Gen List Of String</em>'. <!-- begin-user-doc
* --> This implementation returns null; returning a non-null result will terminate the switch. <!-- end-user-doc -->
*

Back to the top