diff options
Diffstat (limited to 'plugins/org.eclipse.qvtd.xtext.qvtimperative/emf-gen/org/eclipse/qvtd/xtext/qvtimperativecs/impl/ObservableStatementCSImpl.java')
-rw-r--r-- | plugins/org.eclipse.qvtd.xtext.qvtimperative/emf-gen/org/eclipse/qvtd/xtext/qvtimperativecs/impl/ObservableStatementCSImpl.java | 160 |
1 files changed, 160 insertions, 0 deletions
diff --git a/plugins/org.eclipse.qvtd.xtext.qvtimperative/emf-gen/org/eclipse/qvtd/xtext/qvtimperativecs/impl/ObservableStatementCSImpl.java b/plugins/org.eclipse.qvtd.xtext.qvtimperative/emf-gen/org/eclipse/qvtd/xtext/qvtimperativecs/impl/ObservableStatementCSImpl.java new file mode 100644 index 000000000..a6e57a93e --- /dev/null +++ b/plugins/org.eclipse.qvtd.xtext.qvtimperative/emf-gen/org/eclipse/qvtd/xtext/qvtimperativecs/impl/ObservableStatementCSImpl.java @@ -0,0 +1,160 @@ +/** + * <copyright> + * + * Copyright (c) 2013, 2017 Willink Transformations and others. + * 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: + * E.D.Willink - Initial API and implementation + * + * </copyright> + */ +package org.eclipse.qvtd.xtext.qvtimperativecs.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.ocl.xtext.basecs.PathNameCS; +import org.eclipse.qvtd.xtext.qvtimperativecs.ObservableStatementCS; +import org.eclipse.qvtd.xtext.qvtimperativecs.QVTimperativeCSPackage; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Observable Statement CS</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link org.eclipse.qvtd.xtext.qvtimperativecs.impl.ObservableStatementCSImpl#getObservedProperties <em>Observed Properties</em>}</li> + * </ul> + * + * @generated + */ +public abstract class ObservableStatementCSImpl extends StatementCSImpl implements ObservableStatementCS { + /** + * The cached value of the '{@link #getObservedProperties() <em>Observed Properties</em>}' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getObservedProperties() + * @generated + * @ordered + */ + protected EList<PathNameCS> observedProperties; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected ObservableStatementCSImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return QVTimperativeCSPackage.Literals.OBSERVABLE_STATEMENT_CS; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public EList<PathNameCS> getObservedProperties() { + if (observedProperties == null) { + observedProperties = new EObjectContainmentEList<PathNameCS>(PathNameCS.class, this, QVTimperativeCSPackage.OBSERVABLE_STATEMENT_CS__OBSERVED_PROPERTIES); + } + return observedProperties; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case QVTimperativeCSPackage.OBSERVABLE_STATEMENT_CS__OBSERVED_PROPERTIES: + return ((InternalEList<?>)getObservedProperties()).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 QVTimperativeCSPackage.OBSERVABLE_STATEMENT_CS__OBSERVED_PROPERTIES: + return getObservedProperties(); + } + 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 QVTimperativeCSPackage.OBSERVABLE_STATEMENT_CS__OBSERVED_PROPERTIES: + getObservedProperties().clear(); + getObservedProperties().addAll((Collection<? extends PathNameCS>)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case QVTimperativeCSPackage.OBSERVABLE_STATEMENT_CS__OBSERVED_PROPERTIES: + getObservedProperties().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case QVTimperativeCSPackage.OBSERVABLE_STATEMENT_CS__OBSERVED_PROPERTIES: + return observedProperties != null && !observedProperties.isEmpty(); + } + return super.eIsSet(featureID); + } + + +} //ObservableStatementCSImpl |