All Downloads are FREE. Search and download functionalities are using the official Maven repository.

edelta.edelta.impl.EdeltaModifyEcoreOperationImpl Maven / Gradle / Ivy

The newest version!
/**
 * generated by Xtext 2.35.0
 */
package edelta.edelta.impl;

import edelta.edelta.EdeltaModifyEcoreOperation;
import edelta.edelta.EdeltaPackage;

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.EPackage;
import org.eclipse.emf.ecore.InternalEObject;

import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;

import org.eclipse.xtext.xbase.XExpression;

/**
 * 
 * An implementation of the model object 'Modify Ecore Operation'.
 * 
 * 

* The following features are implemented: *

*
    *
  • {@link edelta.edelta.impl.EdeltaModifyEcoreOperationImpl#getName Name}
  • *
  • {@link edelta.edelta.impl.EdeltaModifyEcoreOperationImpl#getEpackage Epackage}
  • *
  • {@link edelta.edelta.impl.EdeltaModifyEcoreOperationImpl#getBody Body}
  • *
* * @generated */ public class EdeltaModifyEcoreOperationImpl extends MinimalEObjectImpl.Container implements EdeltaModifyEcoreOperation { /** * The default value of the '{@link #getName() Name}' attribute. * * * @see #getName() * @generated * @ordered */ protected static final String NAME_EDEFAULT = null; /** * The cached value of the '{@link #getName() Name}' attribute. * * * @see #getName() * @generated * @ordered */ protected String name = NAME_EDEFAULT; /** * The cached value of the '{@link #getEpackage() Epackage}' reference. * * * @see #getEpackage() * @generated * @ordered */ protected EPackage epackage; /** * The cached value of the '{@link #getBody() Body}' containment reference. * * * @see #getBody() * @generated * @ordered */ protected XExpression body; /** * * * @generated */ protected EdeltaModifyEcoreOperationImpl() { super(); } /** * * * @generated */ @Override protected EClass eStaticClass() { return EdeltaPackage.Literals.EDELTA_MODIFY_ECORE_OPERATION; } /** * * * @generated */ @Override public String getName() { return name; } /** * * * @generated */ @Override public void setName(String newName) { String oldName = name; name = newName; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, EdeltaPackage.EDELTA_MODIFY_ECORE_OPERATION__NAME, oldName, name)); } /** * * * @generated */ @Override public EPackage getEpackage() { if (epackage != null && epackage.eIsProxy()) { InternalEObject oldEpackage = (InternalEObject)epackage; epackage = (EPackage)eResolveProxy(oldEpackage); if (epackage != oldEpackage) { if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.RESOLVE, EdeltaPackage.EDELTA_MODIFY_ECORE_OPERATION__EPACKAGE, oldEpackage, epackage)); } } return epackage; } /** * * * @generated */ public EPackage basicGetEpackage() { return epackage; } /** * * * @generated */ @Override public void setEpackage(EPackage newEpackage) { EPackage oldEpackage = epackage; epackage = newEpackage; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, EdeltaPackage.EDELTA_MODIFY_ECORE_OPERATION__EPACKAGE, oldEpackage, epackage)); } /** * * * @generated */ @Override public XExpression getBody() { return body; } /** * * * @generated */ public NotificationChain basicSetBody(XExpression newBody, NotificationChain msgs) { XExpression oldBody = body; body = newBody; if (eNotificationRequired()) { ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, EdeltaPackage.EDELTA_MODIFY_ECORE_OPERATION__BODY, oldBody, newBody); if (msgs == null) msgs = notification; else msgs.add(notification); } return msgs; } /** * * * @generated */ @Override public void setBody(XExpression newBody) { if (newBody != body) { NotificationChain msgs = null; if (body != null) msgs = ((InternalEObject)body).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - EdeltaPackage.EDELTA_MODIFY_ECORE_OPERATION__BODY, null, msgs); if (newBody != null) msgs = ((InternalEObject)newBody).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - EdeltaPackage.EDELTA_MODIFY_ECORE_OPERATION__BODY, null, msgs); msgs = basicSetBody(newBody, msgs); if (msgs != null) msgs.dispatch(); } else if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, EdeltaPackage.EDELTA_MODIFY_ECORE_OPERATION__BODY, newBody, newBody)); } /** * * * @generated */ @Override public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { switch (featureID) { case EdeltaPackage.EDELTA_MODIFY_ECORE_OPERATION__BODY: return basicSetBody(null, msgs); } return super.eInverseRemove(otherEnd, featureID, msgs); } /** * * * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case EdeltaPackage.EDELTA_MODIFY_ECORE_OPERATION__NAME: return getName(); case EdeltaPackage.EDELTA_MODIFY_ECORE_OPERATION__EPACKAGE: if (resolve) return getEpackage(); return basicGetEpackage(); case EdeltaPackage.EDELTA_MODIFY_ECORE_OPERATION__BODY: return getBody(); } return super.eGet(featureID, resolve, coreType); } /** * * * @generated */ @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case EdeltaPackage.EDELTA_MODIFY_ECORE_OPERATION__NAME: setName((String)newValue); return; case EdeltaPackage.EDELTA_MODIFY_ECORE_OPERATION__EPACKAGE: setEpackage((EPackage)newValue); return; case EdeltaPackage.EDELTA_MODIFY_ECORE_OPERATION__BODY: setBody((XExpression)newValue); return; } super.eSet(featureID, newValue); } /** * * * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case EdeltaPackage.EDELTA_MODIFY_ECORE_OPERATION__NAME: setName(NAME_EDEFAULT); return; case EdeltaPackage.EDELTA_MODIFY_ECORE_OPERATION__EPACKAGE: setEpackage((EPackage)null); return; case EdeltaPackage.EDELTA_MODIFY_ECORE_OPERATION__BODY: setBody((XExpression)null); return; } super.eUnset(featureID); } /** * * * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case EdeltaPackage.EDELTA_MODIFY_ECORE_OPERATION__NAME: return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); case EdeltaPackage.EDELTA_MODIFY_ECORE_OPERATION__EPACKAGE: return epackage != null; case EdeltaPackage.EDELTA_MODIFY_ECORE_OPERATION__BODY: return body != null; } return super.eIsSet(featureID); } /** * * * @generated */ @Override public String toString() { if (eIsProxy()) return super.toString(); StringBuilder result = new StringBuilder(super.toString()); result.append(" (name: "); result.append(name); result.append(')'); return result.toString(); } } //EdeltaModifyEcoreOperationImpl




© 2015 - 2024 Weber Informatics LLC | Privacy Policy