Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/org.eclipse.etrice.core.config/src-gen/org/eclipse/etrice/core/config/impl/PortInstanceConfigImpl.java')
-rw-r--r--plugins/org.eclipse.etrice.core.config/src-gen/org/eclipse/etrice/core/config/impl/PortInstanceConfigImpl.java240
1 files changed, 240 insertions, 0 deletions
diff --git a/plugins/org.eclipse.etrice.core.config/src-gen/org/eclipse/etrice/core/config/impl/PortInstanceConfigImpl.java b/plugins/org.eclipse.etrice.core.config/src-gen/org/eclipse/etrice/core/config/impl/PortInstanceConfigImpl.java
new file mode 100644
index 000000000..abd628923
--- /dev/null
+++ b/plugins/org.eclipse.etrice.core.config/src-gen/org/eclipse/etrice/core/config/impl/PortInstanceConfigImpl.java
@@ -0,0 +1,240 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+
+ */
+package org.eclipse.etrice.core.config.impl;
+
+import java.util.Collection;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
+
+import org.eclipse.emf.ecore.util.EObjectContainmentEList;
+import org.eclipse.emf.ecore.util.InternalEList;
+
+import org.eclipse.etrice.core.config.AttrInstanceConfig;
+import org.eclipse.etrice.core.config.ConfigPackage;
+import org.eclipse.etrice.core.config.PortInstanceConfig;
+
+import org.eclipse.etrice.core.room.InterfaceItem;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Port Instance Config</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.etrice.core.config.impl.PortInstanceConfigImpl#getItem <em>Item</em>}</li>
+ * <li>{@link org.eclipse.etrice.core.config.impl.PortInstanceConfigImpl#getAttributes <em>Attributes</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class PortInstanceConfigImpl extends MinimalEObjectImpl.Container implements PortInstanceConfig
+{
+ /**
+ * The cached value of the '{@link #getItem() <em>Item</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getItem()
+ * @generated
+ * @ordered
+ */
+ protected InterfaceItem item;
+
+ /**
+ * The cached value of the '{@link #getAttributes() <em>Attributes</em>}' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getAttributes()
+ * @generated
+ * @ordered
+ */
+ protected EList<AttrInstanceConfig> attributes;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected PortInstanceConfigImpl()
+ {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass()
+ {
+ return ConfigPackage.Literals.PORT_INSTANCE_CONFIG;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public InterfaceItem getItem()
+ {
+ if (item != null && item.eIsProxy())
+ {
+ InternalEObject oldItem = (InternalEObject)item;
+ item = (InterfaceItem)eResolveProxy(oldItem);
+ if (item != oldItem)
+ {
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, ConfigPackage.PORT_INSTANCE_CONFIG__ITEM, oldItem, item));
+ }
+ }
+ return item;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public InterfaceItem basicGetItem()
+ {
+ return item;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setItem(InterfaceItem newItem)
+ {
+ InterfaceItem oldItem = item;
+ item = newItem;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, ConfigPackage.PORT_INSTANCE_CONFIG__ITEM, oldItem, item));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<AttrInstanceConfig> getAttributes()
+ {
+ if (attributes == null)
+ {
+ attributes = new EObjectContainmentEList<AttrInstanceConfig>(AttrInstanceConfig.class, this, ConfigPackage.PORT_INSTANCE_CONFIG__ATTRIBUTES);
+ }
+ return attributes;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
+ {
+ switch (featureID)
+ {
+ case ConfigPackage.PORT_INSTANCE_CONFIG__ATTRIBUTES:
+ return ((InternalEList<?>)getAttributes()).basicRemove(otherEnd, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType)
+ {
+ switch (featureID)
+ {
+ case ConfigPackage.PORT_INSTANCE_CONFIG__ITEM:
+ if (resolve) return getItem();
+ return basicGetItem();
+ case ConfigPackage.PORT_INSTANCE_CONFIG__ATTRIBUTES:
+ return getAttributes();
+ }
+ 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 ConfigPackage.PORT_INSTANCE_CONFIG__ITEM:
+ setItem((InterfaceItem)newValue);
+ return;
+ case ConfigPackage.PORT_INSTANCE_CONFIG__ATTRIBUTES:
+ getAttributes().clear();
+ getAttributes().addAll((Collection<? extends AttrInstanceConfig>)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID)
+ {
+ switch (featureID)
+ {
+ case ConfigPackage.PORT_INSTANCE_CONFIG__ITEM:
+ setItem((InterfaceItem)null);
+ return;
+ case ConfigPackage.PORT_INSTANCE_CONFIG__ATTRIBUTES:
+ getAttributes().clear();
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID)
+ {
+ switch (featureID)
+ {
+ case ConfigPackage.PORT_INSTANCE_CONFIG__ITEM:
+ return item != null;
+ case ConfigPackage.PORT_INSTANCE_CONFIG__ATTRIBUTES:
+ return attributes != null && !attributes.isEmpty();
+ }
+ return super.eIsSet(featureID);
+ }
+
+} //PortInstanceConfigImpl

Back to the top