| /* |
| * Copyright (c) 2022 Eike Stepper (Loehne, Germany) and others. |
| * All rights reserved. This program and the accompanying materials |
| * are made available under the terms of the Eclipse Public License v1.0 |
| * which accompanies this distribution, and is available at |
| * http://www.eclipse.org/legal/epl-v10.html |
| * |
| * Contributors: |
| * Eike Stepper - initial API and implementation |
| */ |
| package org.eclipse.emf.cdo.lm.impl; |
| |
| import org.eclipse.emf.cdo.etypes.impl.ModelElementImpl; |
| import org.eclipse.emf.cdo.lm.LMPackage; |
| import org.eclipse.emf.cdo.lm.ModuleType; |
| |
| 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.InternalEObject; |
| |
| import java.lang.reflect.InvocationTargetException; |
| |
| /** |
| * <!-- begin-user-doc --> An implementation of the model object '<em><b>Module |
| * Type</b></em>'. <!-- end-user-doc --> |
| * <p> |
| * The following features are implemented: |
| * </p> |
| * <ul> |
| * <li>{@link org.eclipse.emf.cdo.lm.impl.ModuleTypeImpl#getProcess <em>Process</em>}</li> |
| * <li>{@link org.eclipse.emf.cdo.lm.impl.ModuleTypeImpl#getName <em>Name</em>}</li> |
| * </ul> |
| * |
| * @generated |
| */ |
| public class ModuleTypeImpl extends ModelElementImpl implements ModuleType |
| { |
| /** |
| * The default value of the '{@link #getName() <em>Name</em>}' attribute. <!-- |
| * begin-user-doc --> <!-- end-user-doc --> |
| * |
| * @see #getName() |
| * @generated |
| * @ordered |
| */ |
| protected static final String NAME_EDEFAULT = null; |
| |
| /** |
| * <!-- begin-user-doc --> <!-- end-user-doc --> |
| * @generated |
| */ |
| protected ModuleTypeImpl() |
| { |
| super(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| protected EClass eStaticClass() |
| { |
| return LMPackage.Literals.MODULE_TYPE; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public org.eclipse.emf.cdo.lm.Process getProcess() |
| { |
| return (org.eclipse.emf.cdo.lm.Process)eDynamicGet(LMPackage.MODULE_TYPE__PROCESS, LMPackage.Literals.MODULE_TYPE__PROCESS, true, true); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> <!-- end-user-doc --> |
| * @generated |
| */ |
| public NotificationChain basicSetProcess(org.eclipse.emf.cdo.lm.Process newProcess, NotificationChain msgs) |
| { |
| msgs = eBasicSetContainer((InternalEObject)newProcess, LMPackage.MODULE_TYPE__PROCESS, msgs); |
| return msgs; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void setProcess(org.eclipse.emf.cdo.lm.Process newProcess) |
| { |
| eDynamicSet(LMPackage.MODULE_TYPE__PROCESS, LMPackage.Literals.MODULE_TYPE__PROCESS, newProcess); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public String getName() |
| { |
| return (String)eDynamicGet(LMPackage.MODULE_TYPE__NAME, LMPackage.Literals.MODULE_TYPE__NAME, true, true); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void setName(String newName) |
| { |
| eDynamicSet(LMPackage.MODULE_TYPE__NAME, LMPackage.Literals.MODULE_TYPE__NAME, newName); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public org.eclipse.emf.cdo.lm.System getSystem() |
| { |
| // 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 eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) |
| { |
| switch (featureID) |
| { |
| case LMPackage.MODULE_TYPE__PROCESS: |
| if (eInternalContainer() != null) |
| { |
| msgs = eBasicRemoveFromContainer(msgs); |
| } |
| return basicSetProcess((org.eclipse.emf.cdo.lm.Process)otherEnd, msgs); |
| } |
| return super.eInverseAdd(otherEnd, featureID, msgs); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) |
| { |
| switch (featureID) |
| { |
| case LMPackage.MODULE_TYPE__PROCESS: |
| return basicSetProcess(null, msgs); |
| } |
| return super.eInverseRemove(otherEnd, featureID, msgs); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs) |
| { |
| switch (eContainerFeatureID()) |
| { |
| case LMPackage.MODULE_TYPE__PROCESS: |
| return eInternalContainer().eInverseRemove(this, LMPackage.PROCESS__MODULE_TYPES, org.eclipse.emf.cdo.lm.Process.class, msgs); |
| } |
| return super.eBasicRemoveFromContainerFeature(msgs); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public Object eGet(int featureID, boolean resolve, boolean coreType) |
| { |
| switch (featureID) |
| { |
| case LMPackage.MODULE_TYPE__PROCESS: |
| return getProcess(); |
| case LMPackage.MODULE_TYPE__NAME: |
| return getName(); |
| } |
| return super.eGet(featureID, resolve, coreType); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eSet(int featureID, Object newValue) |
| { |
| switch (featureID) |
| { |
| case LMPackage.MODULE_TYPE__PROCESS: |
| setProcess((org.eclipse.emf.cdo.lm.Process)newValue); |
| return; |
| case LMPackage.MODULE_TYPE__NAME: |
| setName((String)newValue); |
| return; |
| } |
| super.eSet(featureID, newValue); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eUnset(int featureID) |
| { |
| switch (featureID) |
| { |
| case LMPackage.MODULE_TYPE__PROCESS: |
| setProcess((org.eclipse.emf.cdo.lm.Process)null); |
| return; |
| case LMPackage.MODULE_TYPE__NAME: |
| setName(NAME_EDEFAULT); |
| return; |
| } |
| super.eUnset(featureID); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public boolean eIsSet(int featureID) |
| { |
| switch (featureID) |
| { |
| case LMPackage.MODULE_TYPE__PROCESS: |
| return getProcess() != null; |
| case LMPackage.MODULE_TYPE__NAME: |
| return NAME_EDEFAULT == null ? getName() != null : !NAME_EDEFAULT.equals(getName()); |
| } |
| return super.eIsSet(featureID); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public Object eInvoke(int operationID, EList<?> arguments) throws InvocationTargetException |
| { |
| switch (operationID) |
| { |
| case LMPackage.MODULE_TYPE___GET_SYSTEM: |
| return getSystem(); |
| } |
| return super.eInvoke(operationID, arguments); |
| } |
| |
| } // ModuleTypeImpl |