/** * generated by Xtext 2.26.0 */ package com.minres.rdl.rdl.impl; import com.minres.rdl.rdl.ConcatElem; import com.minres.rdl.rdl.InstancePropertyRef; import com.minres.rdl.rdl.RdlPackage; 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; /** * * An implementation of the model object 'Concat Elem'. * *

* The following features are implemented: *

* * * @generated */ public class ConcatElemImpl extends MinimalEObjectImpl.Container implements ConcatElem { /** * The cached value of the '{@link #getInstPropRef() Inst Prop Ref}' containment reference. * * * @see #getInstPropRef() * @generated * @ordered */ protected InstancePropertyRef instPropRef; /** * The default value of the '{@link #getValue() Value}' attribute. * * * @see #getValue() * @generated * @ordered */ protected static final Object VALUE_EDEFAULT = null; /** * The cached value of the '{@link #getValue() Value}' attribute. * * * @see #getValue() * @generated * @ordered */ protected Object value = VALUE_EDEFAULT; /** * * * @generated */ protected ConcatElemImpl() { super(); } /** * * * @generated */ @Override protected EClass eStaticClass() { return RdlPackage.Literals.CONCAT_ELEM; } /** * * * @generated */ @Override public InstancePropertyRef getInstPropRef() { return instPropRef; } /** * * * @generated */ public NotificationChain basicSetInstPropRef(InstancePropertyRef newInstPropRef, NotificationChain msgs) { InstancePropertyRef oldInstPropRef = instPropRef; instPropRef = newInstPropRef; if (eNotificationRequired()) { ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, RdlPackage.CONCAT_ELEM__INST_PROP_REF, oldInstPropRef, newInstPropRef); if (msgs == null) msgs = notification; else msgs.add(notification); } return msgs; } /** * * * @generated */ @Override public void setInstPropRef(InstancePropertyRef newInstPropRef) { if (newInstPropRef != instPropRef) { NotificationChain msgs = null; if (instPropRef != null) msgs = ((InternalEObject)instPropRef).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - RdlPackage.CONCAT_ELEM__INST_PROP_REF, null, msgs); if (newInstPropRef != null) msgs = ((InternalEObject)newInstPropRef).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - RdlPackage.CONCAT_ELEM__INST_PROP_REF, null, msgs); msgs = basicSetInstPropRef(newInstPropRef, msgs); if (msgs != null) msgs.dispatch(); } else if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, RdlPackage.CONCAT_ELEM__INST_PROP_REF, newInstPropRef, newInstPropRef)); } /** * * * @generated */ @Override public Object getValue() { return value; } /** * * * @generated */ @Override public void setValue(Object newValue) { Object oldValue = value; value = newValue; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, RdlPackage.CONCAT_ELEM__VALUE, oldValue, value)); } /** * * * @generated */ @Override public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { switch (featureID) { case RdlPackage.CONCAT_ELEM__INST_PROP_REF: return basicSetInstPropRef(null, msgs); } return super.eInverseRemove(otherEnd, featureID, msgs); } /** * * * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case RdlPackage.CONCAT_ELEM__INST_PROP_REF: return getInstPropRef(); case RdlPackage.CONCAT_ELEM__VALUE: return getValue(); } return super.eGet(featureID, resolve, coreType); } /** * * * @generated */ @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case RdlPackage.CONCAT_ELEM__INST_PROP_REF: setInstPropRef((InstancePropertyRef)newValue); return; case RdlPackage.CONCAT_ELEM__VALUE: setValue(newValue); return; } super.eSet(featureID, newValue); } /** * * * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case RdlPackage.CONCAT_ELEM__INST_PROP_REF: setInstPropRef((InstancePropertyRef)null); return; case RdlPackage.CONCAT_ELEM__VALUE: setValue(VALUE_EDEFAULT); return; } super.eUnset(featureID); } /** * * * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case RdlPackage.CONCAT_ELEM__INST_PROP_REF: return instPropRef != null; case RdlPackage.CONCAT_ELEM__VALUE: return VALUE_EDEFAULT == null ? value != null : !VALUE_EDEFAULT.equals(value); } return super.eIsSet(featureID); } /** * * * @generated */ @Override public String toString() { if (eIsProxy()) return super.toString(); StringBuilder result = new StringBuilder(super.toString()); result.append(" (value: "); result.append(value); result.append(')'); return result.toString(); } } //ConcatElemImpl