Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/declaration/impl/DefinitionImpl.java')
-rw-r--r--plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/declaration/impl/DefinitionImpl.java155
1 files changed, 155 insertions, 0 deletions
diff --git a/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/declaration/impl/DefinitionImpl.java b/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/declaration/impl/DefinitionImpl.java
new file mode 100644
index 00000000..37910e2d
--- /dev/null
+++ b/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/declaration/impl/DefinitionImpl.java
@@ -0,0 +1,155 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id: DefinitionImpl.java,v 1.1 2008/02/27 13:21:08 sefftinge Exp $
+ */
+package org.eclipse.xpand3.declaration.impl;
+
+import java.util.Collection;
+
+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.util.EObjectContainmentEList;
+import org.eclipse.emf.ecore.util.InternalEList;
+
+import org.eclipse.xpand3.declaration.DeclarationPackage;
+import org.eclipse.xpand3.declaration.Definition;
+
+import org.eclipse.xpand3.statement.AbstractStatement;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Definition</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.xpand3.declaration.impl.DefinitionImpl#getBody <em>Body</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class DefinitionImpl extends AbstractNamedDeclarationImpl implements Definition {
+ /**
+ * The cached value of the '{@link #getBody() <em>Body</em>}' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getBody()
+ * @generated
+ * @ordered
+ */
+ protected EList<AbstractStatement> body;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected DefinitionImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return DeclarationPackage.Literals.DEFINITION;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<AbstractStatement> getBody() {
+ if (body == null) {
+ body = new EObjectContainmentEList<AbstractStatement>(AbstractStatement.class, this, DeclarationPackage.DEFINITION__BODY);
+ }
+ return body;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case DeclarationPackage.DEFINITION__BODY:
+ return ((InternalEList<?>)getBody()).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 DeclarationPackage.DEFINITION__BODY:
+ return getBody();
+ }
+ 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 DeclarationPackage.DEFINITION__BODY:
+ getBody().clear();
+ getBody().addAll((Collection<? extends AbstractStatement>)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case DeclarationPackage.DEFINITION__BODY:
+ getBody().clear();
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case DeclarationPackage.DEFINITION__BODY:
+ return body != null && !body.isEmpty();
+ }
+ return super.eIsSet(featureID);
+ }
+
+} //DefinitionImpl

Back to the top