/******************************************************************************* * Copyright (c) 2010-2015 Henshin developers. 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: * TU Berlin, University of Luxembourg, SES S.A. *******************************************************************************/ /** */ package lu.uni.snt.repeat.rEPEAT.impl; import lu.uni.snt.repeat.rEPEAT.REPEATPackage; import lu.uni.snt.repeat.rEPEAT.Read; import lu.uni.snt.repeat.rEPEAT.Sym; 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; /** * <!-- begin-user-doc --> * An implementation of the model object '<em><b>Read</b></em>'. * <!-- end-user-doc --> * <p> * The following features are implemented: * <ul> * <li>{@link lu.uni.snt.repeat.rEPEAT.impl.ReadImpl#getParam <em>Param</em>}</li> * </ul> * </p> * * @generated */ public class ReadImpl extends Stmnt_LST_ElemImpl implements Read { /** * The cached value of the '{@link #getParam() <em>Param</em>}' containment reference. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getParam() * @generated * @ordered */ protected Sym param; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected ReadImpl() { super(); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override protected EClass eStaticClass() { return REPEATPackage.Literals.READ; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public Sym getParam() { return param; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public NotificationChain basicSetParam(Sym newParam, NotificationChain msgs) { Sym oldParam = param; param = newParam; if (eNotificationRequired()) { ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, REPEATPackage.READ__PARAM, oldParam, newParam); if (msgs == null) msgs = notification; else msgs.add(notification); } return msgs; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setParam(Sym newParam) { if (newParam != param) { NotificationChain msgs = null; if (param != null) msgs = ((InternalEObject)param).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - REPEATPackage.READ__PARAM, null, msgs); if (newParam != null) msgs = ((InternalEObject)newParam).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - REPEATPackage.READ__PARAM, null, msgs); msgs = basicSetParam(newParam, msgs); if (msgs != null) msgs.dispatch(); } else if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, REPEATPackage.READ__PARAM, newParam, newParam)); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { switch (featureID) { case REPEATPackage.READ__PARAM: return basicSetParam(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 REPEATPackage.READ__PARAM: return getParam(); } return super.eGet(featureID, resolve, coreType); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case REPEATPackage.READ__PARAM: setParam((Sym)newValue); return; } super.eSet(featureID, newValue); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case REPEATPackage.READ__PARAM: setParam((Sym)null); return; } super.eUnset(featureID); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case REPEATPackage.READ__PARAM: return param != null; } return super.eIsSet(featureID); } } //ReadImpl