/** * <copyright> * </copyright> * * $Id$ */ package activityDiagram.impl; import activityDiagram.ActivityDiagramPackage; import activityDiagram.ControlFlow; import activityDiagram.ReceiveSignal; 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>Receive Signal</b></em>'. * <!-- end-user-doc --> * <p> * The following features are implemented: * <ul> * <li>{@link activityDiagram.impl.ReceiveSignalImpl#getOutgoing <em>Outgoing</em>}</li> * <li>{@link activityDiagram.impl.ReceiveSignalImpl#getName <em>Name</em>}</li> * </ul> * </p> * * @generated */ public class ReceiveSignalImpl extends ElementImpl implements ReceiveSignal { /** * The cached value of the '{@link #getOutgoing() <em>Outgoing</em>}' reference. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getOutgoing() * @generated * @ordered */ protected ControlFlow outgoing; /** * The default value of the '{@link #getName() <em>Name</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getName() * @generated * @ordered */ protected static final String NAME_EDEFAULT = null; /** * The cached value of the '{@link #getName() <em>Name</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getName() * @generated * @ordered */ protected String name = NAME_EDEFAULT; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected ReceiveSignalImpl() { super(); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override protected EClass eStaticClass() { return ActivityDiagramPackage.Literals.RECEIVE_SIGNAL; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public ControlFlow getOutgoing() { if (outgoing != null && outgoing.eIsProxy()) { InternalEObject oldOutgoing = (InternalEObject)outgoing; outgoing = (ControlFlow)eResolveProxy(oldOutgoing); if (outgoing != oldOutgoing) { if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.RESOLVE, ActivityDiagramPackage.RECEIVE_SIGNAL__OUTGOING, oldOutgoing, outgoing)); } } return outgoing; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public ControlFlow basicGetOutgoing() { return outgoing; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setOutgoing(ControlFlow newOutgoing) { ControlFlow oldOutgoing = outgoing; outgoing = newOutgoing; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, ActivityDiagramPackage.RECEIVE_SIGNAL__OUTGOING, oldOutgoing, outgoing)); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public String getName() { return name; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setName(String newName) { String oldName = name; name = newName; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, ActivityDiagramPackage.RECEIVE_SIGNAL__NAME, oldName, name)); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case ActivityDiagramPackage.RECEIVE_SIGNAL__OUTGOING: if (resolve) return getOutgoing(); return basicGetOutgoing(); case ActivityDiagramPackage.RECEIVE_SIGNAL__NAME: return getName(); } return super.eGet(featureID, resolve, coreType); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case ActivityDiagramPackage.RECEIVE_SIGNAL__OUTGOING: setOutgoing((ControlFlow)newValue); return; case ActivityDiagramPackage.RECEIVE_SIGNAL__NAME: setName((String)newValue); return; } super.eSet(featureID, newValue); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case ActivityDiagramPackage.RECEIVE_SIGNAL__OUTGOING: setOutgoing((ControlFlow)null); return; case ActivityDiagramPackage.RECEIVE_SIGNAL__NAME: setName(NAME_EDEFAULT); return; } super.eUnset(featureID); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case ActivityDiagramPackage.RECEIVE_SIGNAL__OUTGOING: return outgoing != null; case ActivityDiagramPackage.RECEIVE_SIGNAL__NAME: return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); } return super.eIsSet(featureID); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public String toString() { if (eIsProxy()) return super.toString(); StringBuffer result = new StringBuffer(super.toString()); result.append(" (name: "); result.append(name); result.append(')'); return result.toString(); } } //ReceiveSignalImpl