/** * <copyright> * </copyright> * */ package at.bestsolution.e4.jfx.xtext.jFXCss.impl; import at.bestsolution.e4.jfx.xtext.jFXCss.AddressValue; import at.bestsolution.e4.jfx.xtext.jFXCss.JFXCssPackage; import at.bestsolution.e4.jfx.xtext.jFXCss.UrlValue; import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.common.notify.NotificationChain; 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.MinimalEObjectImpl; /** * <!-- begin-user-doc --> * An implementation of the model object '<em><b>Url Value</b></em>'. * <!-- end-user-doc --> * <p> * The following features are implemented: * <ul> * <li>{@link at.bestsolution.e4.jfx.xtext.jFXCss.impl.UrlValueImpl#getAddress <em>Address</em>}</li> * </ul> * </p> * * @generated */ public class UrlValueImpl extends MinimalEObjectImpl.Container implements UrlValue { /** * The cached value of the '{@link #getAddress() <em>Address</em>}' containment reference. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getAddress() * @generated * @ordered */ protected AddressValue address; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected UrlValueImpl() { super(); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override protected EClass eStaticClass() { return JFXCssPackage.Literals.URL_VALUE; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public AddressValue getAddress() { return address; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public NotificationChain basicSetAddress(AddressValue newAddress, NotificationChain msgs) { AddressValue oldAddress = address; address = newAddress; if (eNotificationRequired()) { ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, JFXCssPackage.URL_VALUE__ADDRESS, oldAddress, newAddress); if (msgs == null) msgs = notification; else msgs.add(notification); } return msgs; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setAddress(AddressValue newAddress) { if (newAddress != address) { NotificationChain msgs = null; if (address != null) msgs = ((InternalEObject)address).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - JFXCssPackage.URL_VALUE__ADDRESS, null, msgs); if (newAddress != null) msgs = ((InternalEObject)newAddress).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - JFXCssPackage.URL_VALUE__ADDRESS, null, msgs); msgs = basicSetAddress(newAddress, msgs); if (msgs != null) msgs.dispatch(); } else if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, JFXCssPackage.URL_VALUE__ADDRESS, newAddress, newAddress)); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { switch (featureID) { case JFXCssPackage.URL_VALUE__ADDRESS: return basicSetAddress(null, msgs); } return super.eInverseRemove(otherEnd, featureID, msgs); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case JFXCssPackage.URL_VALUE__ADDRESS: return getAddress(); } return super.eGet(featureID, resolve, coreType); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case JFXCssPackage.URL_VALUE__ADDRESS: setAddress((AddressValue)newValue); return; } super.eSet(featureID, newValue); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case JFXCssPackage.URL_VALUE__ADDRESS: setAddress((AddressValue)null); return; } super.eUnset(featureID); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case JFXCssPackage.URL_VALUE__ADDRESS: return address != null; } return super.eIsSet(featureID); } } //UrlValueImpl