/** * <copyright> * </copyright> * * $Id$ */ package net.sf.orcc.moc.impl; import net.sf.orcc.df.Action; import net.sf.orcc.moc.Invocation; import net.sf.orcc.moc.MocPackage; 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.emf.ecore.impl.EObjectImpl; /** * <!-- begin-user-doc --> * An implementation of the model object '<em><b>Invocation</b></em>'. * <!-- end-user-doc --> * <p> * The following features are implemented: * <ul> * <li>{@link net.sf.orcc.moc.impl.InvocationImpl#getAction <em>Action</em>}</li> * </ul> * </p> * * @generated */ public class InvocationImpl extends EObjectImpl implements Invocation { /** * The cached value of the '{@link #getAction() <em>Action</em>}' reference. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getAction() * @generated * @ordered */ protected Action action; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected InvocationImpl() { super(); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override protected EClass eStaticClass() { return MocPackage.Literals.INVOCATION; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public Action getAction() { if (action != null && action.eIsProxy()) { InternalEObject oldAction = (InternalEObject) action; action = (Action) eResolveProxy(oldAction); if (action != oldAction) { if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.RESOLVE, MocPackage.INVOCATION__ACTION, oldAction, action)); } } return action; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public Action basicGetAction() { return action; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setAction(Action newAction) { Action oldAction = action; action = newAction; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, MocPackage.INVOCATION__ACTION, oldAction, action)); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case MocPackage.INVOCATION__ACTION: if (resolve) return getAction(); return basicGetAction(); } return super.eGet(featureID, resolve, coreType); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case MocPackage.INVOCATION__ACTION: setAction((Action) newValue); return; } super.eSet(featureID, newValue); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case MocPackage.INVOCATION__ACTION: setAction((Action) null); return; } super.eUnset(featureID); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case MocPackage.INVOCATION__ACTION: return action != null; } return super.eIsSet(featureID); } } //InvocationImpl