/** * <copyright> * </copyright> * * $Id$ */ package no.hal.scxml.scxmlxt.impl; import no.hal.scxml.scxmlxt.ScxmlxtPackage; import no.hal.scxml.scxmlxt.State; import no.hal.scxml.scxmlxt.Transition; 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>Transition</b></em>'. * <!-- end-user-doc --> * <p> * The following features are implemented: * <ul> * <li>{@link no.hal.scxml.scxmlxt.impl.TransitionImpl#getTarget <em>Target</em>}</li> * </ul> * </p> * * @generated */ public class TransitionImpl extends AbstractTransitionImpl implements Transition { /** * The cached value of the '{@link #getTarget() <em>Target</em>}' reference. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getTarget() * @generated * @ordered */ protected State target; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected TransitionImpl() { super(); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override protected EClass eStaticClass() { return ScxmlxtPackage.Literals.TRANSITION; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public State getTarget() { if (target != null && target.eIsProxy()) { InternalEObject oldTarget = (InternalEObject)target; target = (State)eResolveProxy(oldTarget); if (target != oldTarget) { if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.RESOLVE, ScxmlxtPackage.TRANSITION__TARGET, oldTarget, target)); } } return target; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public State basicGetTarget() { return target; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setTarget(State newTarget) { State oldTarget = target; target = newTarget; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, ScxmlxtPackage.TRANSITION__TARGET, oldTarget, target)); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case ScxmlxtPackage.TRANSITION__TARGET: if (resolve) return getTarget(); return basicGetTarget(); } return super.eGet(featureID, resolve, coreType); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case ScxmlxtPackage.TRANSITION__TARGET: setTarget((State)newValue); return; } super.eSet(featureID, newValue); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case ScxmlxtPackage.TRANSITION__TARGET: setTarget((State)null); return; } super.eUnset(featureID); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case ScxmlxtPackage.TRANSITION__TARGET: return target != null; } return super.eIsSet(featureID); } } //TransitionImpl