/** * 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.MetamodelElement; import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.EClassifier; import org.eclipse.emf.ecore.ENamedElement; import org.eclipse.emf.ecore.InternalEObject; import org.eclipse.emf.ecore.impl.ENotificationImpl; /** * * An implementation of the model object 'Metamodel Element'. * *

* The following features are implemented: *

* * * @generated */ public class MetamodelElementImpl extends MetamodelEntryImpl implements MetamodelElement { /** * The cached value of the '{@link #getClassifier() Classifier}' reference. * * * @see #getClassifier() * @generated * @ordered */ protected EClassifier classifier; /** * The cached value of the '{@link #getFeature() Feature}' reference. * * * @see #getFeature() * @generated * @ordered */ protected ENamedElement feature; /** * * * @generated */ protected MetamodelElementImpl() { super(); } /** * * * @generated */ @Override protected EClass eStaticClass() { return ApplicationConfigurationPackage.Literals.METAMODEL_ELEMENT; } /** * * * @generated */ @Override public EClassifier getClassifier() { if (classifier != null && classifier.eIsProxy()) { InternalEObject oldClassifier = (InternalEObject)classifier; classifier = (EClassifier)eResolveProxy(oldClassifier); if (classifier != oldClassifier) { if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.RESOLVE, ApplicationConfigurationPackage.METAMODEL_ELEMENT__CLASSIFIER, oldClassifier, classifier)); } } return classifier; } /** * * * @generated */ public EClassifier basicGetClassifier() { return classifier; } /** * * * @generated */ @Override public void setClassifier(EClassifier newClassifier) { EClassifier oldClassifier = classifier; classifier = newClassifier; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, ApplicationConfigurationPackage.METAMODEL_ELEMENT__CLASSIFIER, oldClassifier, classifier)); } /** * * * @generated */ @Override public ENamedElement getFeature() { if (feature != null && feature.eIsProxy()) { InternalEObject oldFeature = (InternalEObject)feature; feature = (ENamedElement)eResolveProxy(oldFeature); if (feature != oldFeature) { if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.RESOLVE, ApplicationConfigurationPackage.METAMODEL_ELEMENT__FEATURE, oldFeature, feature)); } } return feature; } /** * * * @generated */ public ENamedElement basicGetFeature() { return feature; } /** * * * @generated */ @Override public void setFeature(ENamedElement newFeature) { ENamedElement oldFeature = feature; feature = newFeature; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, ApplicationConfigurationPackage.METAMODEL_ELEMENT__FEATURE, oldFeature, feature)); } /** * * * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case ApplicationConfigurationPackage.METAMODEL_ELEMENT__CLASSIFIER: if (resolve) return getClassifier(); return basicGetClassifier(); case ApplicationConfigurationPackage.METAMODEL_ELEMENT__FEATURE: if (resolve) return getFeature(); return basicGetFeature(); } return super.eGet(featureID, resolve, coreType); } /** * * * @generated */ @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case ApplicationConfigurationPackage.METAMODEL_ELEMENT__CLASSIFIER: setClassifier((EClassifier)newValue); return; case ApplicationConfigurationPackage.METAMODEL_ELEMENT__FEATURE: setFeature((ENamedElement)newValue); return; } super.eSet(featureID, newValue); } /** * * * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case ApplicationConfigurationPackage.METAMODEL_ELEMENT__CLASSIFIER: setClassifier((EClassifier)null); return; case ApplicationConfigurationPackage.METAMODEL_ELEMENT__FEATURE: setFeature((ENamedElement)null); return; } super.eUnset(featureID); } /** * * * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case ApplicationConfigurationPackage.METAMODEL_ELEMENT__CLASSIFIER: return classifier != null; case ApplicationConfigurationPackage.METAMODEL_ELEMENT__FEATURE: return feature != null; } return super.eIsSet(featureID); } } //MetamodelElementImpl