Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/expression/impl/CastImpl.java')
-rw-r--r--plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/expression/impl/CastImpl.java247
1 files changed, 247 insertions, 0 deletions
diff --git a/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/expression/impl/CastImpl.java b/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/expression/impl/CastImpl.java
new file mode 100644
index 00000000..62a0f9db
--- /dev/null
+++ b/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/expression/impl/CastImpl.java
@@ -0,0 +1,247 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id: CastImpl.java,v 1.1 2008/02/27 13:21:08 sefftinge Exp $
+ */
+package org.eclipse.xpand3.expression.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.xpand3.Identifier;
+
+import org.eclipse.xpand3.expression.AbstractExpression;
+import org.eclipse.xpand3.expression.Cast;
+import org.eclipse.xpand3.expression.ExpressionPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Cast</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.xpand3.expression.impl.CastImpl#getType <em>Type</em>}</li>
+ * <li>{@link org.eclipse.xpand3.expression.impl.CastImpl#getTarget <em>Target</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class CastImpl extends AbstractExpressionImpl implements Cast {
+ /**
+ * The cached value of the '{@link #getType() <em>Type</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getType()
+ * @generated
+ * @ordered
+ */
+ protected Identifier type;
+
+ /**
+ * The cached value of the '{@link #getTarget() <em>Target</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getTarget()
+ * @generated
+ * @ordered
+ */
+ protected AbstractExpression target;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected CastImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return ExpressionPackage.Literals.CAST;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Identifier getType() {
+ return type;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NotificationChain basicSetType(Identifier newType, NotificationChain msgs) {
+ Identifier oldType = type;
+ type = newType;
+ if (eNotificationRequired()) {
+ ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, ExpressionPackage.CAST__TYPE, oldType, newType);
+ if (msgs == null) msgs = notification; else msgs.add(notification);
+ }
+ return msgs;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setType(Identifier newType) {
+ if (newType != type) {
+ NotificationChain msgs = null;
+ if (type != null)
+ msgs = ((InternalEObject)type).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - ExpressionPackage.CAST__TYPE, null, msgs);
+ if (newType != null)
+ msgs = ((InternalEObject)newType).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - ExpressionPackage.CAST__TYPE, null, msgs);
+ msgs = basicSetType(newType, msgs);
+ if (msgs != null) msgs.dispatch();
+ }
+ else if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, ExpressionPackage.CAST__TYPE, newType, newType));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public AbstractExpression getTarget() {
+ return target;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NotificationChain basicSetTarget(AbstractExpression newTarget, NotificationChain msgs) {
+ AbstractExpression oldTarget = target;
+ target = newTarget;
+ if (eNotificationRequired()) {
+ ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, ExpressionPackage.CAST__TARGET, oldTarget, newTarget);
+ if (msgs == null) msgs = notification; else msgs.add(notification);
+ }
+ return msgs;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setTarget(AbstractExpression newTarget) {
+ if (newTarget != target) {
+ NotificationChain msgs = null;
+ if (target != null)
+ msgs = ((InternalEObject)target).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - ExpressionPackage.CAST__TARGET, null, msgs);
+ if (newTarget != null)
+ msgs = ((InternalEObject)newTarget).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - ExpressionPackage.CAST__TARGET, null, msgs);
+ msgs = basicSetTarget(newTarget, msgs);
+ if (msgs != null) msgs.dispatch();
+ }
+ else if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, ExpressionPackage.CAST__TARGET, newTarget, newTarget));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case ExpressionPackage.CAST__TYPE:
+ return basicSetType(null, msgs);
+ case ExpressionPackage.CAST__TARGET:
+ return basicSetTarget(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 ExpressionPackage.CAST__TYPE:
+ return getType();
+ case ExpressionPackage.CAST__TARGET:
+ return getTarget();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case ExpressionPackage.CAST__TYPE:
+ setType((Identifier)newValue);
+ return;
+ case ExpressionPackage.CAST__TARGET:
+ setTarget((AbstractExpression)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case ExpressionPackage.CAST__TYPE:
+ setType((Identifier)null);
+ return;
+ case ExpressionPackage.CAST__TARGET:
+ setTarget((AbstractExpression)null);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case ExpressionPackage.CAST__TYPE:
+ return type != null;
+ case ExpressionPackage.CAST__TARGET:
+ return target != null;
+ }
+ return super.eIsSet(featureID);
+ }
+
+} //CastImpl

Back to the top