/** */ package ca.mcgill.ecse.dslreasoner.standalone.test.fam.impl; import ca.mcgill.ecse.dslreasoner.standalone.test.fam.Function; import ca.mcgill.ecse.dslreasoner.standalone.test.fam.FunctionType; import ca.mcgill.ecse.dslreasoner.standalone.test.fam.FunctionalElement; import ca.mcgill.ecse.dslreasoner.standalone.test.fam.famPackage; import java.util.Collection; import org.eclipse.emf.common.notify.NotificationChain; import org.eclipse.emf.common.util.EList; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.EStructuralFeature; import org.eclipse.emf.ecore.InternalEObject; import org.eclipse.emf.ecore.util.EObjectContainmentWithInverseEList; import org.eclipse.emf.ecore.util.InternalEList; /** * * An implementation of the model object 'Function'. * *

* The following features are implemented: *

* * * @generated */ public class FunctionImpl extends FunctionalElementImpl implements Function { /** * The cached value of the '{@link #getSubElements() Sub Elements}' containment reference list. * * * @see #getSubElements() * @generated * @ordered */ protected EList subElements; /** * The cached setting delegate for the '{@link #getType() Type}' attribute. * * * @see #getType() * @generated * @ordered */ protected EStructuralFeature.Internal.SettingDelegate TYPE__ESETTING_DELEGATE = ((EStructuralFeature.Internal)famPackage.Literals.FUNCTION__TYPE).getSettingDelegate(); /** * * * @generated */ protected FunctionImpl() { super(); } /** * * * @generated */ @Override protected EClass eStaticClass() { return famPackage.Literals.FUNCTION; } /** * * * @generated */ public EList getSubElements() { if (subElements == null) { subElements = new EObjectContainmentWithInverseEList(FunctionalElement.class, this, famPackage.FUNCTION__SUB_ELEMENTS, famPackage.FUNCTIONAL_ELEMENT__PARENT); } return subElements; } /** * * * @generated */ public FunctionType getType() { return (FunctionType)TYPE__ESETTING_DELEGATE.dynamicGet(this, null, 0, true, false); } /** * * * @generated */ @SuppressWarnings("unchecked") @Override public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { switch (featureID) { case famPackage.FUNCTION__SUB_ELEMENTS: return ((InternalEList)(InternalEList)getSubElements()).basicAdd(otherEnd, msgs); } return super.eInverseAdd(otherEnd, featureID, msgs); } /** * * * @generated */ @Override public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { switch (featureID) { case famPackage.FUNCTION__SUB_ELEMENTS: return ((InternalEList)getSubElements()).basicRemove(otherEnd, msgs); } return super.eInverseRemove(otherEnd, featureID, msgs); } /** * * * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case famPackage.FUNCTION__SUB_ELEMENTS: return getSubElements(); case famPackage.FUNCTION__TYPE: return getType(); } return super.eGet(featureID, resolve, coreType); } /** * * * @generated */ @SuppressWarnings("unchecked") @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case famPackage.FUNCTION__SUB_ELEMENTS: getSubElements().clear(); getSubElements().addAll((Collection)newValue); return; } super.eSet(featureID, newValue); } /** * * * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case famPackage.FUNCTION__SUB_ELEMENTS: getSubElements().clear(); return; } super.eUnset(featureID); } /** * * * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case famPackage.FUNCTION__SUB_ELEMENTS: return subElements != null && !subElements.isEmpty(); case famPackage.FUNCTION__TYPE: return TYPE__ESETTING_DELEGATE.dynamicIsSet(this, null, 0); } return super.eIsSet(featureID); } } //FunctionImpl