/** */ package hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.impl; import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.LogiclanguagePackage; import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.TypeReference; import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Variable; 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 'Variable'. * *

* The following features are implemented: *

* * * @generated */ public class VariableImpl extends SymbolicDeclarationImpl implements Variable { /** * The cached value of the '{@link #getRange() Range}' containment reference. * * * @see #getRange() * @generated * @ordered */ protected TypeReference range; /** * * * @generated */ protected VariableImpl() { super(); } /** * * * @generated */ @Override protected EClass eStaticClass() { return LogiclanguagePackage.Literals.VARIABLE; } /** * * * @generated */ public TypeReference getRange() { return range; } /** * * * @generated */ public NotificationChain basicSetRange(TypeReference newRange, NotificationChain msgs) { TypeReference oldRange = range; range = newRange; if (eNotificationRequired()) { ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, LogiclanguagePackage.VARIABLE__RANGE, oldRange, newRange); if (msgs == null) msgs = notification; else msgs.add(notification); } return msgs; } /** * * * @generated */ public void setRange(TypeReference newRange) { if (newRange != range) { NotificationChain msgs = null; if (range != null) msgs = ((InternalEObject)range).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - LogiclanguagePackage.VARIABLE__RANGE, null, msgs); if (newRange != null) msgs = ((InternalEObject)newRange).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - LogiclanguagePackage.VARIABLE__RANGE, null, msgs); msgs = basicSetRange(newRange, msgs); if (msgs != null) msgs.dispatch(); } else if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, LogiclanguagePackage.VARIABLE__RANGE, newRange, newRange)); } /** * * * @generated */ @Override public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { switch (featureID) { case LogiclanguagePackage.VARIABLE__RANGE: return basicSetRange(null, msgs); } return super.eInverseRemove(otherEnd, featureID, msgs); } /** * * * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case LogiclanguagePackage.VARIABLE__RANGE: return getRange(); } return super.eGet(featureID, resolve, coreType); } /** * * * @generated */ @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case LogiclanguagePackage.VARIABLE__RANGE: setRange((TypeReference)newValue); return; } super.eSet(featureID, newValue); } /** * * * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case LogiclanguagePackage.VARIABLE__RANGE: setRange((TypeReference)null); return; } super.eUnset(featureID); } /** * * * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case LogiclanguagePackage.VARIABLE__RANGE: return range != null; } return super.eIsSet(featureID); } } //VariableImpl