/** * generated by Xtext 2.10.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.TypeReference; import hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.TypeScope; 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; import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; /** * * An implementation of the model object 'Type Scope'. * *

* The following features are implemented: *

* * * @generated */ public class TypeScopeImpl extends MinimalEObjectImpl.Container implements TypeScope { /** * The cached value of the '{@link #getType() Type}' containment reference. * * * @see #getType() * @generated * @ordered */ protected TypeReference type; /** * The default value of the '{@link #isSetsNew() Sets New}' attribute. * * * @see #isSetsNew() * @generated * @ordered */ protected static final boolean SETS_NEW_EDEFAULT = false; /** * The cached value of the '{@link #isSetsNew() Sets New}' attribute. * * * @see #isSetsNew() * @generated * @ordered */ protected boolean setsNew = SETS_NEW_EDEFAULT; /** * The default value of the '{@link #isSetsSum() Sets Sum}' attribute. * * * @see #isSetsSum() * @generated * @ordered */ protected static final boolean SETS_SUM_EDEFAULT = false; /** * The cached value of the '{@link #isSetsSum() Sets Sum}' attribute. * * * @see #isSetsSum() * @generated * @ordered */ protected boolean setsSum = SETS_SUM_EDEFAULT; /** * The default value of the '{@link #getMin() Min}' attribute. * * * @see #getMin() * @generated * @ordered */ protected static final int MIN_EDEFAULT = 0; /** * The cached value of the '{@link #getMin() Min}' attribute. * * * @see #getMin() * @generated * @ordered */ protected int min = MIN_EDEFAULT; /** * The default value of the '{@link #isMaxUnlimited() Max Unlimited}' attribute. * * * @see #isMaxUnlimited() * @generated * @ordered */ protected static final boolean MAX_UNLIMITED_EDEFAULT = false; /** * The cached value of the '{@link #isMaxUnlimited() Max Unlimited}' attribute. * * * @see #isMaxUnlimited() * @generated * @ordered */ protected boolean maxUnlimited = MAX_UNLIMITED_EDEFAULT; /** * The default value of the '{@link #getMax() Max}' attribute. * * * @see #getMax() * @generated * @ordered */ protected static final int MAX_EDEFAULT = 0; /** * The cached value of the '{@link #getMax() Max}' attribute. * * * @see #getMax() * @generated * @ordered */ protected int max = MAX_EDEFAULT; /** * * * @generated */ protected TypeScopeImpl() { super(); } /** * * * @generated */ @Override protected EClass eStaticClass() { return ApplicationConfigurationPackage.Literals.TYPE_SCOPE; } /** * * * @generated */ public TypeReference getType() { return type; } /** * * * @generated */ public NotificationChain basicSetType(TypeReference newType, NotificationChain msgs) { TypeReference oldType = type; type = newType; if (eNotificationRequired()) { ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, ApplicationConfigurationPackage.TYPE_SCOPE__TYPE, oldType, newType); if (msgs == null) msgs = notification; else msgs.add(notification); } return msgs; } /** * * * @generated */ public void setType(TypeReference newType) { if (newType != type) { NotificationChain msgs = null; if (type != null) msgs = ((InternalEObject)type).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - ApplicationConfigurationPackage.TYPE_SCOPE__TYPE, null, msgs); if (newType != null) msgs = ((InternalEObject)newType).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - ApplicationConfigurationPackage.TYPE_SCOPE__TYPE, null, msgs); msgs = basicSetType(newType, msgs); if (msgs != null) msgs.dispatch(); } else if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, ApplicationConfigurationPackage.TYPE_SCOPE__TYPE, newType, newType)); } /** * * * @generated */ public boolean isSetsNew() { return setsNew; } /** * * * @generated */ public void setSetsNew(boolean newSetsNew) { boolean oldSetsNew = setsNew; setsNew = newSetsNew; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, ApplicationConfigurationPackage.TYPE_SCOPE__SETS_NEW, oldSetsNew, setsNew)); } /** * * * @generated */ public boolean isSetsSum() { return setsSum; } /** * * * @generated */ public void setSetsSum(boolean newSetsSum) { boolean oldSetsSum = setsSum; setsSum = newSetsSum; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, ApplicationConfigurationPackage.TYPE_SCOPE__SETS_SUM, oldSetsSum, setsSum)); } /** * * * @generated */ public int getMin() { return min; } /** * * * @generated */ public void setMin(int newMin) { int oldMin = min; min = newMin; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, ApplicationConfigurationPackage.TYPE_SCOPE__MIN, oldMin, min)); } /** * * * @generated */ public boolean isMaxUnlimited() { return maxUnlimited; } /** * * * @generated */ public void setMaxUnlimited(boolean newMaxUnlimited) { boolean oldMaxUnlimited = maxUnlimited; maxUnlimited = newMaxUnlimited; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, ApplicationConfigurationPackage.TYPE_SCOPE__MAX_UNLIMITED, oldMaxUnlimited, maxUnlimited)); } /** * * * @generated */ public int getMax() { return max; } /** * * * @generated */ public void setMax(int newMax) { int oldMax = max; max = newMax; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, ApplicationConfigurationPackage.TYPE_SCOPE__MAX, oldMax, max)); } /** * * * @generated */ @Override public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { switch (featureID) { case ApplicationConfigurationPackage.TYPE_SCOPE__TYPE: return basicSetType(null, msgs); } return super.eInverseRemove(otherEnd, featureID, msgs); } /** * * * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case ApplicationConfigurationPackage.TYPE_SCOPE__TYPE: return getType(); case ApplicationConfigurationPackage.TYPE_SCOPE__SETS_NEW: return isSetsNew(); case ApplicationConfigurationPackage.TYPE_SCOPE__SETS_SUM: return isSetsSum(); case ApplicationConfigurationPackage.TYPE_SCOPE__MIN: return getMin(); case ApplicationConfigurationPackage.TYPE_SCOPE__MAX_UNLIMITED: return isMaxUnlimited(); case ApplicationConfigurationPackage.TYPE_SCOPE__MAX: return getMax(); } return super.eGet(featureID, resolve, coreType); } /** * * * @generated */ @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case ApplicationConfigurationPackage.TYPE_SCOPE__TYPE: setType((TypeReference)newValue); return; case ApplicationConfigurationPackage.TYPE_SCOPE__SETS_NEW: setSetsNew((Boolean)newValue); return; case ApplicationConfigurationPackage.TYPE_SCOPE__SETS_SUM: setSetsSum((Boolean)newValue); return; case ApplicationConfigurationPackage.TYPE_SCOPE__MIN: setMin((Integer)newValue); return; case ApplicationConfigurationPackage.TYPE_SCOPE__MAX_UNLIMITED: setMaxUnlimited((Boolean)newValue); return; case ApplicationConfigurationPackage.TYPE_SCOPE__MAX: setMax((Integer)newValue); return; } super.eSet(featureID, newValue); } /** * * * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case ApplicationConfigurationPackage.TYPE_SCOPE__TYPE: setType((TypeReference)null); return; case ApplicationConfigurationPackage.TYPE_SCOPE__SETS_NEW: setSetsNew(SETS_NEW_EDEFAULT); return; case ApplicationConfigurationPackage.TYPE_SCOPE__SETS_SUM: setSetsSum(SETS_SUM_EDEFAULT); return; case ApplicationConfigurationPackage.TYPE_SCOPE__MIN: setMin(MIN_EDEFAULT); return; case ApplicationConfigurationPackage.TYPE_SCOPE__MAX_UNLIMITED: setMaxUnlimited(MAX_UNLIMITED_EDEFAULT); return; case ApplicationConfigurationPackage.TYPE_SCOPE__MAX: setMax(MAX_EDEFAULT); return; } super.eUnset(featureID); } /** * * * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case ApplicationConfigurationPackage.TYPE_SCOPE__TYPE: return type != null; case ApplicationConfigurationPackage.TYPE_SCOPE__SETS_NEW: return setsNew != SETS_NEW_EDEFAULT; case ApplicationConfigurationPackage.TYPE_SCOPE__SETS_SUM: return setsSum != SETS_SUM_EDEFAULT; case ApplicationConfigurationPackage.TYPE_SCOPE__MIN: return min != MIN_EDEFAULT; case ApplicationConfigurationPackage.TYPE_SCOPE__MAX_UNLIMITED: return maxUnlimited != MAX_UNLIMITED_EDEFAULT; case ApplicationConfigurationPackage.TYPE_SCOPE__MAX: return max != MAX_EDEFAULT; } return super.eIsSet(featureID); } /** * * * @generated */ @Override public String toString() { if (eIsProxy()) return super.toString(); StringBuffer result = new StringBuffer(super.toString()); result.append(" (setsNew: "); result.append(setsNew); result.append(", setsSum: "); result.append(setsSum); result.append(", min: "); result.append(min); result.append(", maxUnlimited: "); result.append(maxUnlimited); result.append(", max: "); result.append(max); result.append(')'); return result.toString(); } } //TypeScopeImpl