/** * generated by Xtext 2.14.0 */ package ca.mcgill.ecse.dslreasoner.vampireLanguage.impl; import ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSOtherDeclaration; import ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSTerm; import ca.mcgill.ecse.dslreasoner.vampireLanguage.VampireLanguagePackage; 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; /** * * An implementation of the model object 'VLS Other Declaration'. * *

* The following features are implemented: *

* * * @generated */ public class VLSOtherDeclarationImpl extends VLSDeclarationImpl implements VLSOtherDeclaration { /** * The cached value of the '{@link #getName() Name}' containment reference. * * * @see #getName() * @generated * @ordered */ protected VLSTerm name; /** * * * @generated */ protected VLSOtherDeclarationImpl() { super(); } /** * * * @generated */ @Override protected EClass eStaticClass() { return VampireLanguagePackage.Literals.VLS_OTHER_DECLARATION; } /** * * * @generated */ public VLSTerm getName() { return name; } /** * * * @generated */ public NotificationChain basicSetName(VLSTerm newName, NotificationChain msgs) { VLSTerm oldName = name; name = newName; if (eNotificationRequired()) { ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, VampireLanguagePackage.VLS_OTHER_DECLARATION__NAME, oldName, newName); if (msgs == null) msgs = notification; else msgs.add(notification); } return msgs; } /** * * * @generated */ public void setName(VLSTerm newName) { if (newName != name) { NotificationChain msgs = null; if (name != null) msgs = ((InternalEObject)name).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - VampireLanguagePackage.VLS_OTHER_DECLARATION__NAME, null, msgs); if (newName != null) msgs = ((InternalEObject)newName).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - VampireLanguagePackage.VLS_OTHER_DECLARATION__NAME, null, msgs); msgs = basicSetName(newName, msgs); if (msgs != null) msgs.dispatch(); } else if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, VampireLanguagePackage.VLS_OTHER_DECLARATION__NAME, newName, newName)); } /** * * * @generated */ @Override public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { switch (featureID) { case VampireLanguagePackage.VLS_OTHER_DECLARATION__NAME: return basicSetName(null, msgs); } return super.eInverseRemove(otherEnd, featureID, msgs); } /** * * * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case VampireLanguagePackage.VLS_OTHER_DECLARATION__NAME: return getName(); } return super.eGet(featureID, resolve, coreType); } /** * * * @generated */ @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case VampireLanguagePackage.VLS_OTHER_DECLARATION__NAME: setName((VLSTerm)newValue); return; } super.eSet(featureID, newValue); } /** * * * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case VampireLanguagePackage.VLS_OTHER_DECLARATION__NAME: setName((VLSTerm)null); return; } super.eUnset(featureID); } /** * * * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case VampireLanguagePackage.VLS_OTHER_DECLARATION__NAME: return name != null; } return super.eIsSet(featureID); } } //VLSOtherDeclarationImpl