Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'extraplugins/alf/org.eclipse.papyrus.operation.editor.xtext/src-gen/org/eclipse/papyrus/operation/editor/xtext/operation/impl/FormalParameterImpl.java')
-rw-r--r--extraplugins/alf/org.eclipse.papyrus.operation.editor.xtext/src-gen/org/eclipse/papyrus/operation/editor/xtext/operation/impl/FormalParameterImpl.java333
1 files changed, 333 insertions, 0 deletions
diff --git a/extraplugins/alf/org.eclipse.papyrus.operation.editor.xtext/src-gen/org/eclipse/papyrus/operation/editor/xtext/operation/impl/FormalParameterImpl.java b/extraplugins/alf/org.eclipse.papyrus.operation.editor.xtext/src-gen/org/eclipse/papyrus/operation/editor/xtext/operation/impl/FormalParameterImpl.java
new file mode 100644
index 00000000000..ba26b2c69ef
--- /dev/null
+++ b/extraplugins/alf/org.eclipse.papyrus.operation.editor.xtext/src-gen/org/eclipse/papyrus/operation/editor/xtext/operation/impl/FormalParameterImpl.java
@@ -0,0 +1,333 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ *
+ * 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:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.operation.editor.xtext.operation.impl;
+
+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.impl.MinimalEObjectImpl;
+
+import org.eclipse.papyrus.operation.editor.xtext.operation.FormalParameter;
+import org.eclipse.papyrus.operation.editor.xtext.operation.OperationPackage;
+import org.eclipse.papyrus.operation.editor.xtext.operation.ParameterDirection;
+import org.eclipse.papyrus.operation.editor.xtext.operation.TypePart;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Formal Parameter</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.operation.editor.xtext.operation.impl.FormalParameterImpl#getDirection <em>Direction</em>}</li>
+ * <li>{@link org.eclipse.papyrus.operation.editor.xtext.operation.impl.FormalParameterImpl#getName <em>Name</em>}</li>
+ * <li>{@link org.eclipse.papyrus.operation.editor.xtext.operation.impl.FormalParameterImpl#getType <em>Type</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class FormalParameterImpl extends MinimalEObjectImpl.Container implements FormalParameter
+{
+ /**
+ * The default value of the '{@link #getDirection() <em>Direction</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getDirection()
+ * @generated
+ * @ordered
+ */
+ protected static final ParameterDirection DIRECTION_EDEFAULT = ParameterDirection.IN;
+
+ /**
+ * The cached value of the '{@link #getDirection() <em>Direction</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getDirection()
+ * @generated
+ * @ordered
+ */
+ protected ParameterDirection direction = DIRECTION_EDEFAULT;
+
+ /**
+ * The default value of the '{@link #getName() <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getName()
+ * @generated
+ * @ordered
+ */
+ protected static final String NAME_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getName() <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getName()
+ * @generated
+ * @ordered
+ */
+ protected String name = NAME_EDEFAULT;
+
+ /**
+ * The cached value of the '{@link #getType() <em>Type</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getType()
+ * @generated
+ * @ordered
+ */
+ protected TypePart type;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected FormalParameterImpl()
+ {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass()
+ {
+ return OperationPackage.Literals.FORMAL_PARAMETER;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ParameterDirection getDirection()
+ {
+ return direction;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setDirection(ParameterDirection newDirection)
+ {
+ ParameterDirection oldDirection = direction;
+ direction = newDirection == null ? DIRECTION_EDEFAULT : newDirection;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, OperationPackage.FORMAL_PARAMETER__DIRECTION, oldDirection, direction));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getName()
+ {
+ return name;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setName(String newName)
+ {
+ String oldName = name;
+ name = newName;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, OperationPackage.FORMAL_PARAMETER__NAME, oldName, name));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public TypePart getType()
+ {
+ return type;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NotificationChain basicSetType(TypePart newType, NotificationChain msgs)
+ {
+ TypePart oldType = type;
+ type = newType;
+ if (eNotificationRequired())
+ {
+ ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, OperationPackage.FORMAL_PARAMETER__TYPE, oldType, newType);
+ if (msgs == null) msgs = notification; else msgs.add(notification);
+ }
+ return msgs;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setType(TypePart newType)
+ {
+ if (newType != type)
+ {
+ NotificationChain msgs = null;
+ if (type != null)
+ msgs = ((InternalEObject)type).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - OperationPackage.FORMAL_PARAMETER__TYPE, null, msgs);
+ if (newType != null)
+ msgs = ((InternalEObject)newType).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - OperationPackage.FORMAL_PARAMETER__TYPE, null, msgs);
+ msgs = basicSetType(newType, msgs);
+ if (msgs != null) msgs.dispatch();
+ }
+ else if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, OperationPackage.FORMAL_PARAMETER__TYPE, newType, newType));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
+ {
+ switch (featureID)
+ {
+ case OperationPackage.FORMAL_PARAMETER__TYPE:
+ return basicSetType(null, 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 OperationPackage.FORMAL_PARAMETER__DIRECTION:
+ return getDirection();
+ case OperationPackage.FORMAL_PARAMETER__NAME:
+ return getName();
+ case OperationPackage.FORMAL_PARAMETER__TYPE:
+ return getType();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue)
+ {
+ switch (featureID)
+ {
+ case OperationPackage.FORMAL_PARAMETER__DIRECTION:
+ setDirection((ParameterDirection)newValue);
+ return;
+ case OperationPackage.FORMAL_PARAMETER__NAME:
+ setName((String)newValue);
+ return;
+ case OperationPackage.FORMAL_PARAMETER__TYPE:
+ setType((TypePart)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID)
+ {
+ switch (featureID)
+ {
+ case OperationPackage.FORMAL_PARAMETER__DIRECTION:
+ setDirection(DIRECTION_EDEFAULT);
+ return;
+ case OperationPackage.FORMAL_PARAMETER__NAME:
+ setName(NAME_EDEFAULT);
+ return;
+ case OperationPackage.FORMAL_PARAMETER__TYPE:
+ setType((TypePart)null);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID)
+ {
+ switch (featureID)
+ {
+ case OperationPackage.FORMAL_PARAMETER__DIRECTION:
+ return direction != DIRECTION_EDEFAULT;
+ case OperationPackage.FORMAL_PARAMETER__NAME:
+ return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
+ case OperationPackage.FORMAL_PARAMETER__TYPE:
+ return type != null;
+ }
+ 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(" (direction: ");
+ result.append(direction);
+ result.append(", name: ");
+ result.append(name);
+ result.append(')');
+ return result.toString();
+ }
+
+} //FormalParameterImpl

Back to the top