blob: 7094e14cf4b7bbb48ab0050f691441431eaeb3e9 [file] [log] [blame]
/**
* Copyright (c) 2014 Fraunhofer FOKUS
* 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:
* Marc-Florian Wendland
*/
package org.eclipse.upr.utp.impl;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.InternalEObject;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.emf.ecore.impl.EObjectImpl;
import org.eclipse.emf.ecore.util.EcoreUtil;
import org.eclipse.uml2.common.util.CacheAdapter;
import org.eclipse.uml2.uml.Operation;
import org.eclipse.upr.utp.DataSelector;
import org.eclipse.upr.utp.UTPPackage;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Data Selector</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* <ul>
* <li>{@link org.eclipse.upr.utp.impl.DataSelectorImpl#getBase_Operation <em>Base Operation</em>}</li>
* </ul>
* </p>
*
* @generated
*/
public class DataSelectorImpl extends EObjectImpl implements DataSelector {
/**
* The cached value of the '{@link #getBase_Operation() <em>Base Operation</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getBase_Operation()
* @generated
* @ordered
*/
protected Operation base_Operation;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected DataSelectorImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return UTPPackage.Literals.DATA_SELECTOR;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Operation getBase_Operation() {
if (base_Operation != null && base_Operation.eIsProxy()) {
InternalEObject oldBase_Operation = (InternalEObject)base_Operation;
base_Operation = (Operation)eResolveProxy(oldBase_Operation);
if (base_Operation != oldBase_Operation) {
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.RESOLVE, UTPPackage.DATA_SELECTOR__BASE_OPERATION, oldBase_Operation, base_Operation));
}
}
return base_Operation;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Operation basicGetBase_Operation() {
return base_Operation;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setBase_Operation(Operation newBase_Operation) {
Operation oldBase_Operation = base_Operation;
base_Operation = newBase_Operation;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, UTPPackage.DATA_SELECTOR__BASE_OPERATION, oldBase_Operation, base_Operation));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case UTPPackage.DATA_SELECTOR__BASE_OPERATION:
if (resolve) return getBase_Operation();
return basicGetBase_Operation();
}
return super.eGet(featureID, resolve, coreType);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case UTPPackage.DATA_SELECTOR__BASE_OPERATION:
setBase_Operation((Operation)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case UTPPackage.DATA_SELECTOR__BASE_OPERATION:
setBase_Operation((Operation)null);
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case UTPPackage.DATA_SELECTOR__BASE_OPERATION:
return base_Operation != null;
}
return super.eIsSet(featureID);
}
/**
* Creates a new instance of the specified Ecore class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param eClass The Ecore class of the instance to create.
* @return The new instance.
* @generated
*/
protected EObject create(EClass eClass) {
return EcoreUtil.create(eClass);
}
/**
* Retrieves the cache adapter for this '<em><b>Data Selector</b></em>'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return The cache adapter for this '<em><b>Data Selector</b></em>'.
* @generated
*/
protected CacheAdapter getCacheAdapter() {
return CacheAdapter.getCacheAdapter(this);
}
} //DataSelectorImpl