/** */ package org.eclipse.viatra.solver.language.solverLanguage.impl; import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.InternalEObject; import org.eclipse.emf.ecore.impl.ENotificationImpl; import org.eclipse.viatra.solver.language.solverLanguage.ScopeDeclaration; import org.eclipse.viatra.solver.language.solverLanguage.SolverLanguagePackage; import org.eclipse.viatra.solver.language.solverLanguage.Symbol; /** * * An implementation of the model object 'Scope Declaration'. * *

* The following features are implemented: *

* * * @generated */ public class ScopeDeclarationImpl extends StatementImpl implements ScopeDeclaration { /** * The cached value of the '{@link #getType() Type}' reference. * * * @see #getType() * @generated * @ordered */ protected Symbol type; /** * * * @generated */ protected ScopeDeclarationImpl() { super(); } /** * * * @generated */ @Override protected EClass eStaticClass() { return SolverLanguagePackage.Literals.SCOPE_DECLARATION; } /** * * * @generated */ public Symbol getType() { if (type != null && type.eIsProxy()) { InternalEObject oldType = (InternalEObject) type; type = (Symbol) eResolveProxy(oldType); if (type != oldType) { if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.RESOLVE, SolverLanguagePackage.SCOPE_DECLARATION__TYPE, oldType, type)); } } return type; } /** * * * @generated */ public Symbol basicGetType() { return type; } /** * * * @generated */ public void setType(Symbol newType) { Symbol oldType = type; type = newType; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, SolverLanguagePackage.SCOPE_DECLARATION__TYPE, oldType, type)); } /** * * * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case SolverLanguagePackage.SCOPE_DECLARATION__TYPE: if (resolve) return getType(); return basicGetType(); } return super.eGet(featureID, resolve, coreType); } /** * * * @generated */ @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case SolverLanguagePackage.SCOPE_DECLARATION__TYPE: setType((Symbol) newValue); return; } super.eSet(featureID, newValue); } /** * * * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case SolverLanguagePackage.SCOPE_DECLARATION__TYPE: setType((Symbol) null); return; } super.eUnset(featureID); } /** * * * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case SolverLanguagePackage.SCOPE_DECLARATION__TYPE: return type != null; } return super.eIsSet(featureID); } } //ScopeDeclarationImpl