| /** |
| * ******************************************************************************* |
| * Copyright (c) 2015-2021 Robert Bosch GmbH and others. |
| * |
| * This program and the accompanying materials are made |
| * available under the terms of the Eclipse Public License 2.0 |
| * which is available at https://www.eclipse.org/legal/epl-2.0/ |
| * |
| * SPDX-License-Identifier: EPL-2.0 |
| * |
| * Generated using Eclipse EMF |
| * |
| * ******************************************************************************* |
| */ |
| package org.eclipse.app4mc.amalthea.model.impl; |
| |
| import org.eclipse.app4mc.amalthea.model.AmaltheaPackage; |
| import org.eclipse.app4mc.amalthea.model.GeneralPrecedence; |
| |
| import org.eclipse.emf.common.notify.Notification; |
| |
| import org.eclipse.emf.ecore.EClass; |
| import org.eclipse.emf.ecore.InternalEObject; |
| |
| import org.eclipse.emf.ecore.impl.ENotificationImpl; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * An implementation of the model object '<em><b>General Precedence</b></em>'. |
| * <!-- end-user-doc --> |
| * <p> |
| * The following features are implemented: |
| * </p> |
| * <ul> |
| * <li>{@link org.eclipse.app4mc.amalthea.model.impl.GeneralPrecedenceImpl#getOrigin <em>Origin</em>}</li> |
| * <li>{@link org.eclipse.app4mc.amalthea.model.impl.GeneralPrecedenceImpl#getTarget <em>Target</em>}</li> |
| * </ul> |
| * |
| * @generated |
| */ |
| public abstract class GeneralPrecedenceImpl extends BaseObjectImpl implements GeneralPrecedence { |
| /** |
| * The cached value of the '{@link #getOrigin() <em>Origin</em>}' reference. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getOrigin() |
| * @generated |
| * @ordered |
| */ |
| protected org.eclipse.app4mc.amalthea.model.Runnable origin; |
| |
| /** |
| * The cached value of the '{@link #getTarget() <em>Target</em>}' reference. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getTarget() |
| * @generated |
| * @ordered |
| */ |
| protected org.eclipse.app4mc.amalthea.model.Runnable target; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected GeneralPrecedenceImpl() { |
| super(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| protected EClass eStaticClass() { |
| return AmaltheaPackage.eINSTANCE.getGeneralPrecedence(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public org.eclipse.app4mc.amalthea.model.Runnable getOrigin() { |
| if (origin != null && origin.eIsProxy()) { |
| InternalEObject oldOrigin = (InternalEObject)origin; |
| origin = (org.eclipse.app4mc.amalthea.model.Runnable)eResolveProxy(oldOrigin); |
| if (origin != oldOrigin) { |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.RESOLVE, AmaltheaPackage.GENERAL_PRECEDENCE__ORIGIN, oldOrigin, origin)); |
| } |
| } |
| return origin; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public org.eclipse.app4mc.amalthea.model.Runnable basicGetOrigin() { |
| return origin; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void setOrigin(org.eclipse.app4mc.amalthea.model.Runnable newOrigin) { |
| org.eclipse.app4mc.amalthea.model.Runnable oldOrigin = origin; |
| origin = newOrigin; |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, AmaltheaPackage.GENERAL_PRECEDENCE__ORIGIN, oldOrigin, origin)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public org.eclipse.app4mc.amalthea.model.Runnable getTarget() { |
| if (target != null && target.eIsProxy()) { |
| InternalEObject oldTarget = (InternalEObject)target; |
| target = (org.eclipse.app4mc.amalthea.model.Runnable)eResolveProxy(oldTarget); |
| if (target != oldTarget) { |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.RESOLVE, AmaltheaPackage.GENERAL_PRECEDENCE__TARGET, oldTarget, target)); |
| } |
| } |
| return target; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public org.eclipse.app4mc.amalthea.model.Runnable basicGetTarget() { |
| return target; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void setTarget(org.eclipse.app4mc.amalthea.model.Runnable newTarget) { |
| org.eclipse.app4mc.amalthea.model.Runnable oldTarget = target; |
| target = newTarget; |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, AmaltheaPackage.GENERAL_PRECEDENCE__TARGET, oldTarget, target)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public Object eGet(int featureID, boolean resolve, boolean coreType) { |
| switch (featureID) { |
| case AmaltheaPackage.GENERAL_PRECEDENCE__ORIGIN: |
| if (resolve) return getOrigin(); |
| return basicGetOrigin(); |
| case AmaltheaPackage.GENERAL_PRECEDENCE__TARGET: |
| if (resolve) return getTarget(); |
| return basicGetTarget(); |
| } |
| return super.eGet(featureID, resolve, coreType); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eSet(int featureID, Object newValue) { |
| switch (featureID) { |
| case AmaltheaPackage.GENERAL_PRECEDENCE__ORIGIN: |
| setOrigin((org.eclipse.app4mc.amalthea.model.Runnable)newValue); |
| return; |
| case AmaltheaPackage.GENERAL_PRECEDENCE__TARGET: |
| setTarget((org.eclipse.app4mc.amalthea.model.Runnable)newValue); |
| return; |
| } |
| super.eSet(featureID, newValue); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eUnset(int featureID) { |
| switch (featureID) { |
| case AmaltheaPackage.GENERAL_PRECEDENCE__ORIGIN: |
| setOrigin((org.eclipse.app4mc.amalthea.model.Runnable)null); |
| return; |
| case AmaltheaPackage.GENERAL_PRECEDENCE__TARGET: |
| setTarget((org.eclipse.app4mc.amalthea.model.Runnable)null); |
| return; |
| } |
| super.eUnset(featureID); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public boolean eIsSet(int featureID) { |
| switch (featureID) { |
| case AmaltheaPackage.GENERAL_PRECEDENCE__ORIGIN: |
| return origin != null; |
| case AmaltheaPackage.GENERAL_PRECEDENCE__TARGET: |
| return target != null; |
| } |
| return super.eIsSet(featureID); |
| } |
| |
| } //GeneralPrecedenceImpl |