/** * <copyright> * </copyright> * * $Id$ */ package org.csu.idl.idlmm.impl; import org.csu.idl.idlmm.Expression; import org.csu.idl.idlmm.IdlmmPackage; import org.csu.idl.idlmm.WstringDef; 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>Wstring Def</b></em>'. * <!-- end-user-doc --> * <p> * The following features are implemented: * <ul> * <li>{@link org.csu.idl.idlmm.impl.WstringDefImpl#getBound <em>Bound</em>}</li> * </ul> * </p> * * @generated */ public class WstringDefImpl extends IDLTypeImpl implements WstringDef { /** * The cached value of the '{@link #getBound() <em>Bound</em>}' containment reference. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getBound() * @generated * @ordered */ protected Expression bound; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected WstringDefImpl() { super(); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override protected EClass eStaticClass() { return IdlmmPackage.Literals.WSTRING_DEF; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public Expression getBound() { return bound; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public NotificationChain basicSetBound(Expression newBound, NotificationChain msgs) { Expression oldBound = bound; bound = newBound; if (eNotificationRequired()) { ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, IdlmmPackage.WSTRING_DEF__BOUND, oldBound, newBound); if (msgs == null) msgs = notification; else msgs.add(notification); } return msgs; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setBound(Expression newBound) { if (newBound != bound) { NotificationChain msgs = null; if (bound != null) msgs = ((InternalEObject)bound).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - IdlmmPackage.WSTRING_DEF__BOUND, null, msgs); if (newBound != null) msgs = ((InternalEObject)newBound).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - IdlmmPackage.WSTRING_DEF__BOUND, null, msgs); msgs = basicSetBound(newBound, msgs); if (msgs != null) msgs.dispatch(); } else if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, IdlmmPackage.WSTRING_DEF__BOUND, newBound, newBound)); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { switch (featureID) { case IdlmmPackage.WSTRING_DEF__BOUND: return basicSetBound(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 IdlmmPackage.WSTRING_DEF__BOUND: return getBound(); } return super.eGet(featureID, resolve, coreType); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case IdlmmPackage.WSTRING_DEF__BOUND: setBound((Expression)newValue); return; } super.eSet(featureID, newValue); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case IdlmmPackage.WSTRING_DEF__BOUND: setBound((Expression)null); return; } super.eUnset(featureID); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case IdlmmPackage.WSTRING_DEF__BOUND: return bound != null; } return super.eIsSet(featureID); } } //WstringDefImpl