/** * generated by Xtext 2.10.0 */ package com.arm.cmsis.pack.debugseq.debugSeq.impl; import com.arm.cmsis.pack.debugseq.debugSeq.DapDelay; import com.arm.cmsis.pack.debugseq.debugSeq.DebugSeqPackage; import com.arm.cmsis.pack.debugseq.debugSeq.Expression; 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>Dap Delay</b></em>'. * <!-- end-user-doc --> * <p> * The following features are implemented: * </p> * <ul> * <li>{@link com.arm.cmsis.pack.debugseq.debugSeq.impl.DapDelayImpl#getDelay <em>Delay</em>}</li> * </ul> * * @generated */ public class DapDelayImpl extends ExpressionImpl implements DapDelay { /** * The cached value of the '{@link #getDelay() <em>Delay</em>}' containment reference. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getDelay() * @generated * @ordered */ protected Expression delay; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected DapDelayImpl() { super(); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override protected EClass eStaticClass() { return DebugSeqPackage.Literals.DAP_DELAY; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public Expression getDelay() { return delay; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public NotificationChain basicSetDelay(Expression newDelay, NotificationChain msgs) { Expression oldDelay = delay; delay = newDelay; if (eNotificationRequired()) { ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, DebugSeqPackage.DAP_DELAY__DELAY, oldDelay, newDelay); if (msgs == null) msgs = notification; else msgs.add(notification); } return msgs; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setDelay(Expression newDelay) { if (newDelay != delay) { NotificationChain msgs = null; if (delay != null) msgs = ((InternalEObject)delay).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - DebugSeqPackage.DAP_DELAY__DELAY, null, msgs); if (newDelay != null) msgs = ((InternalEObject)newDelay).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - DebugSeqPackage.DAP_DELAY__DELAY, null, msgs); msgs = basicSetDelay(newDelay, msgs); if (msgs != null) msgs.dispatch(); } else if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, DebugSeqPackage.DAP_DELAY__DELAY, newDelay, newDelay)); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { switch (featureID) { case DebugSeqPackage.DAP_DELAY__DELAY: return basicSetDelay(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 DebugSeqPackage.DAP_DELAY__DELAY: return getDelay(); } return super.eGet(featureID, resolve, coreType); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case DebugSeqPackage.DAP_DELAY__DELAY: setDelay((Expression)newValue); return; } super.eSet(featureID, newValue); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case DebugSeqPackage.DAP_DELAY__DELAY: setDelay((Expression)null); return; } super.eUnset(featureID); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case DebugSeqPackage.DAP_DELAY__DELAY: return delay != null; } return super.eIsSet(featureID); } } //DapDelayImpl