/** */ package io.sarl.lang.sarl.impl; import io.sarl.lang.sarl.SarlAgent; import io.sarl.lang.sarl.SarlPackage; 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.xtend.core.xtend.impl.XtendTypeDeclarationImplCustom; import org.eclipse.xtext.common.types.JvmParameterizedTypeReference; /** * <!-- begin-user-doc --> * An implementation of the model object '<em><b>Agent</b></em>'. * <!-- end-user-doc --> * <p> * The following features are implemented: * </p> * <ul> * <li>{@link io.sarl.lang.sarl.impl.SarlAgentImpl#getExtends <em>Extends</em>}</li> * </ul> * * @generated */ public class SarlAgentImpl extends XtendTypeDeclarationImplCustom implements SarlAgent { /** * The cached value of the '{@link #getExtends() <em>Extends</em>}' containment reference. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getExtends() * @generated * @ordered */ protected JvmParameterizedTypeReference extends_; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected SarlAgentImpl() { super(); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override protected EClass eStaticClass() { return SarlPackage.Literals.SARL_AGENT; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public JvmParameterizedTypeReference getExtends() { return extends_; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public NotificationChain basicSetExtends(JvmParameterizedTypeReference newExtends, NotificationChain msgs) { JvmParameterizedTypeReference oldExtends = extends_; extends_ = newExtends; if (eNotificationRequired()) { ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, SarlPackage.SARL_AGENT__EXTENDS, oldExtends, newExtends); if (msgs == null) msgs = notification; else msgs.add(notification); } return msgs; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setExtends(JvmParameterizedTypeReference newExtends) { if (newExtends != extends_) { NotificationChain msgs = null; if (extends_ != null) msgs = ((InternalEObject)extends_).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - SarlPackage.SARL_AGENT__EXTENDS, null, msgs); if (newExtends != null) msgs = ((InternalEObject)newExtends).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - SarlPackage.SARL_AGENT__EXTENDS, null, msgs); msgs = basicSetExtends(newExtends, msgs); if (msgs != null) msgs.dispatch(); } else if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, SarlPackage.SARL_AGENT__EXTENDS, newExtends, newExtends)); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public boolean isAbstract() { // TODO: implement this method // Ensure that you remove @generated or mark it @generated NOT throw new UnsupportedOperationException(); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public boolean isStrictFloatingPoint() { // TODO: implement this method // Ensure that you remove @generated or mark it @generated NOT throw new UnsupportedOperationException(); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { switch (featureID) { case SarlPackage.SARL_AGENT__EXTENDS: return basicSetExtends(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 SarlPackage.SARL_AGENT__EXTENDS: return getExtends(); } return super.eGet(featureID, resolve, coreType); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case SarlPackage.SARL_AGENT__EXTENDS: setExtends((JvmParameterizedTypeReference)newValue); return; } super.eSet(featureID, newValue); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case SarlPackage.SARL_AGENT__EXTENDS: setExtends((JvmParameterizedTypeReference)null); return; } super.eUnset(featureID); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case SarlPackage.SARL_AGENT__EXTENDS: return extends_ != null; } return super.eIsSet(featureID); } } //SarlAgentImpl