blob: 0644dd68da2a7a976407f5cc7d438d5d4775bb75 [file] [log] [blame]
/**
* *******************************************************************************
* 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.RunnableScope;
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>Runnable Scope</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* </p>
* <ul>
* <li>{@link org.eclipse.app4mc.amalthea.model.impl.RunnableScopeImpl#getRunnable <em>Runnable</em>}</li>
* </ul>
*
* @generated
*/
public class RunnableScopeImpl extends DataGroupScopeImpl implements RunnableScope {
/**
* The cached value of the '{@link #getRunnable() <em>Runnable</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getRunnable()
* @generated
* @ordered
*/
protected org.eclipse.app4mc.amalthea.model.Runnable runnable;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected RunnableScopeImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return AmaltheaPackage.eINSTANCE.getRunnableScope();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public org.eclipse.app4mc.amalthea.model.Runnable getRunnable() {
if (runnable != null && runnable.eIsProxy()) {
InternalEObject oldRunnable = (InternalEObject)runnable;
runnable = (org.eclipse.app4mc.amalthea.model.Runnable)eResolveProxy(oldRunnable);
if (runnable != oldRunnable) {
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.RESOLVE, AmaltheaPackage.RUNNABLE_SCOPE__RUNNABLE, oldRunnable, runnable));
}
}
return runnable;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public org.eclipse.app4mc.amalthea.model.Runnable basicGetRunnable() {
return runnable;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void setRunnable(org.eclipse.app4mc.amalthea.model.Runnable newRunnable) {
org.eclipse.app4mc.amalthea.model.Runnable oldRunnable = runnable;
runnable = newRunnable;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, AmaltheaPackage.RUNNABLE_SCOPE__RUNNABLE, oldRunnable, runnable));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case AmaltheaPackage.RUNNABLE_SCOPE__RUNNABLE:
if (resolve) return getRunnable();
return basicGetRunnable();
}
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.RUNNABLE_SCOPE__RUNNABLE:
setRunnable((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.RUNNABLE_SCOPE__RUNNABLE:
setRunnable((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.RUNNABLE_SCOPE__RUNNABLE:
return runnable != null;
}
return super.eIsSet(featureID);
}
} //RunnableScopeImpl