Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/org.eclipse.m2m.atl.common/src/org/eclipse/m2m/atl/common/ATL/ModuleElement.java')
-rw-r--r--plugins/org.eclipse.m2m.atl.common/src/org/eclipse/m2m/atl/common/ATL/ModuleElement.java217
1 files changed, 217 insertions, 0 deletions
diff --git a/plugins/org.eclipse.m2m.atl.common/src/org/eclipse/m2m/atl/common/ATL/ModuleElement.java b/plugins/org.eclipse.m2m.atl.common/src/org/eclipse/m2m/atl/common/ATL/ModuleElement.java
new file mode 100644
index 00000000..af0fdd4a
--- /dev/null
+++ b/plugins/org.eclipse.m2m.atl.common/src/org/eclipse/m2m/atl/common/ATL/ModuleElement.java
@@ -0,0 +1,217 @@
+/**
+ * Copyright (c) 2008, 2012, 2015 Obeo.
+ * 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:
+ * Obeo - initial API and implementation
+ * Dennis Wagelaar (Vrije Universiteit Brussel)
+ */
+package org.eclipse.m2m.atl.common.ATL;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+import org.eclipse.emf.ecore.util.EcoreUtil;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Module Element</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * </p>
+ * <ul>
+ * <li>{@link org.eclipse.m2m.atl.common.ATL.ModuleElement#getModule <em>Module</em>}</li>
+ * </ul>
+ *
+ * @see org.eclipse.m2m.atl.common.ATL.ATLPackage#getModuleElement()
+ * @model kind="class" abstract="true"
+ * @generated
+ */
+public abstract class ModuleElement extends LocatedElement {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ModuleElement() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return ATLPackage.Literals.MODULE_ELEMENT;
+ }
+
+ /**
+ * Returns the value of the '<em><b>Module</b></em>' container reference.
+ * It is bidirectional and its opposite is '{@link org.eclipse.m2m.atl.common.ATL.Module#getElements <em>Elements</em>}'.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Module</em>' container reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Module</em>' container reference.
+ * @see #setModule(Module)
+ * @see org.eclipse.m2m.atl.common.ATL.ATLPackage#getModuleElement_Module()
+ * @see org.eclipse.m2m.atl.common.ATL.Module#getElements
+ * @model opposite="elements" transient="false" ordered="false"
+ * @generated
+ */
+ public Module getModule() {
+ if (eContainerFeatureID() != ATLPackage.MODULE_ELEMENT__MODULE) return null;
+ return (Module)eInternalContainer();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NotificationChain basicSetModule(Module newModule, NotificationChain msgs) {
+ msgs = eBasicSetContainer((InternalEObject)newModule, ATLPackage.MODULE_ELEMENT__MODULE, msgs);
+ return msgs;
+ }
+
+ /**
+ * Sets the value of the '{@link org.eclipse.m2m.atl.common.ATL.ModuleElement#getModule <em>Module</em>}' container reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Module</em>' container reference.
+ * @see #getModule()
+ * @generated
+ */
+ public void setModule(Module newModule) {
+ if (newModule != eInternalContainer() || (eContainerFeatureID() != ATLPackage.MODULE_ELEMENT__MODULE && newModule != null)) {
+ if (EcoreUtil.isAncestor(this, newModule))
+ throw new IllegalArgumentException("Recursive containment not allowed for " + toString());
+ NotificationChain msgs = null;
+ if (eInternalContainer() != null)
+ msgs = eBasicRemoveFromContainer(msgs);
+ if (newModule != null)
+ msgs = ((InternalEObject)newModule).eInverseAdd(this, ATLPackage.MODULE__ELEMENTS, Module.class, msgs);
+ msgs = basicSetModule(newModule, msgs);
+ if (msgs != null) msgs.dispatch();
+ }
+ else if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, ATLPackage.MODULE_ELEMENT__MODULE, newModule, newModule));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case ATLPackage.MODULE_ELEMENT__MODULE:
+ if (eInternalContainer() != null)
+ msgs = eBasicRemoveFromContainer(msgs);
+ return basicSetModule((Module)otherEnd, msgs);
+ }
+ return super.eInverseAdd(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case ATLPackage.MODULE_ELEMENT__MODULE:
+ return basicSetModule(null, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs) {
+ switch (eContainerFeatureID()) {
+ case ATLPackage.MODULE_ELEMENT__MODULE:
+ return eInternalContainer().eInverseRemove(this, ATLPackage.MODULE__ELEMENTS, Module.class, msgs);
+ }
+ return super.eBasicRemoveFromContainerFeature(msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case ATLPackage.MODULE_ELEMENT__MODULE:
+ return getModule();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case ATLPackage.MODULE_ELEMENT__MODULE:
+ setModule((Module)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case ATLPackage.MODULE_ELEMENT__MODULE:
+ setModule((Module)null);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case ATLPackage.MODULE_ELEMENT__MODULE:
+ return getModule() != null;
+ }
+ return super.eIsSet(featureID);
+ }
+
+} // ModuleElement

Back to the top