/** * <copyright> * </copyright> * * $Id: ActionProxyImpl.java,v 1.2 2011/03/05 21:48:55 auhl Exp $ */ package behavioral.status_and_action.assembly.impl; import behavioral.status_and_action.assembly.ActionProxy; import behavioral.status_and_action.assembly.AssemblyPackage; import behavioral.status_and_action.design.impl.AbstractActionImpl; import data.classes.Signature; 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; /** * <!-- begin-user-doc --> * An implementation of the model object '<em><b>Action Proxy</b></em>'. * <!-- end-user-doc --> * <p> * The following features are implemented: * <ul> * <li>{@link behavioral.status_and_action.assembly.impl.ActionProxyImpl#getAction <em>Action</em>}</li> * </ul> * </p> * * @generated */ public class ActionProxyImpl extends AbstractActionImpl implements ActionProxy { /** * The cached value of the '{@link #getAction() <em>Action</em>}' reference. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getAction() * @generated * @ordered */ protected Signature action; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected ActionProxyImpl() { super(); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override protected EClass eStaticClass() { return AssemblyPackage.Literals.ACTION_PROXY; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public Signature getAction() { if (action != null && action.eIsProxy()) { InternalEObject oldAction = (InternalEObject)action; action = (Signature)eResolveProxy(oldAction); if (action != oldAction) { if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.RESOLVE, AssemblyPackage.ACTION_PROXY__ACTION, oldAction, action)); } } return action; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public Signature basicGetAction() { return action; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setAction(Signature newAction) { Signature oldAction = action; action = newAction; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, AssemblyPackage.ACTION_PROXY__ACTION, oldAction, action)); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case AssemblyPackage.ACTION_PROXY__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 AssemblyPackage.ACTION_PROXY__ACTION: setAction((Signature)newValue); return; } super.eSet(featureID, newValue); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case AssemblyPackage.ACTION_PROXY__ACTION: setAction((Signature)null); return; } super.eUnset(featureID); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case AssemblyPackage.ACTION_PROXY__ACTION: return action != null; } return super.eIsSet(featureID); } } //ActionProxyImpl