/** * generated by Xtext 2.21.0 */ package hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.impl; import hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.ApplicationConfigurationPackage; import hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.PartialModelDeclaration; import hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.PartialModelSpecification; 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 'Partial Model Declaration'. * *

* The following features are implemented: *

* * * @generated */ public class PartialModelDeclarationImpl extends DeclarationImpl implements PartialModelDeclaration { /** * The cached value of the '{@link #getSpecification() Specification}' containment reference. * * * @see #getSpecification() * @generated * @ordered */ protected PartialModelSpecification specification; /** * * * @generated */ protected PartialModelDeclarationImpl() { super(); } /** * * * @generated */ @Override protected EClass eStaticClass() { return ApplicationConfigurationPackage.Literals.PARTIAL_MODEL_DECLARATION; } /** * * * @generated */ @Override public PartialModelSpecification getSpecification() { return specification; } /** * * * @generated */ public NotificationChain basicSetSpecification(PartialModelSpecification newSpecification, NotificationChain msgs) { PartialModelSpecification oldSpecification = specification; specification = newSpecification; if (eNotificationRequired()) { ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, ApplicationConfigurationPackage.PARTIAL_MODEL_DECLARATION__SPECIFICATION, oldSpecification, newSpecification); if (msgs == null) msgs = notification; else msgs.add(notification); } return msgs; } /** * * * @generated */ @Override public void setSpecification(PartialModelSpecification newSpecification) { if (newSpecification != specification) { NotificationChain msgs = null; if (specification != null) msgs = ((InternalEObject)specification).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - ApplicationConfigurationPackage.PARTIAL_MODEL_DECLARATION__SPECIFICATION, null, msgs); if (newSpecification != null) msgs = ((InternalEObject)newSpecification).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - ApplicationConfigurationPackage.PARTIAL_MODEL_DECLARATION__SPECIFICATION, null, msgs); msgs = basicSetSpecification(newSpecification, msgs); if (msgs != null) msgs.dispatch(); } else if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, ApplicationConfigurationPackage.PARTIAL_MODEL_DECLARATION__SPECIFICATION, newSpecification, newSpecification)); } /** * * * @generated */ @Override public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { switch (featureID) { case ApplicationConfigurationPackage.PARTIAL_MODEL_DECLARATION__SPECIFICATION: return basicSetSpecification(null, msgs); } return super.eInverseRemove(otherEnd, featureID, msgs); } /** * * * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case ApplicationConfigurationPackage.PARTIAL_MODEL_DECLARATION__SPECIFICATION: return getSpecification(); } return super.eGet(featureID, resolve, coreType); } /** * * * @generated */ @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case ApplicationConfigurationPackage.PARTIAL_MODEL_DECLARATION__SPECIFICATION: setSpecification((PartialModelSpecification)newValue); return; } super.eSet(featureID, newValue); } /** * * * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case ApplicationConfigurationPackage.PARTIAL_MODEL_DECLARATION__SPECIFICATION: setSpecification((PartialModelSpecification)null); return; } super.eUnset(featureID); } /** * * * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case ApplicationConfigurationPackage.PARTIAL_MODEL_DECLARATION__SPECIFICATION: return specification != null; } return super.eIsSet(featureID); } } //PartialModelDeclarationImpl