| /** |
| * 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.Message; |
| |
| import org.eclipse.upr.utp.TimeOutMessage; |
| import org.eclipse.upr.utp.UTPPackage; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * An implementation of the model object '<em><b>Time Out Message</b></em>'. |
| * <!-- end-user-doc --> |
| * <p> |
| * The following features are implemented: |
| * <ul> |
| * <li>{@link org.eclipse.upr.utp.impl.TimeOutMessageImpl#getBase_Message <em>Base Message</em>}</li> |
| * </ul> |
| * </p> |
| * |
| * @generated |
| */ |
| public class TimeOutMessageImpl extends EObjectImpl implements TimeOutMessage { |
| /** |
| * The cached value of the '{@link #getBase_Message() <em>Base Message</em>}' reference. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getBase_Message() |
| * @generated |
| * @ordered |
| */ |
| protected Message base_Message; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected TimeOutMessageImpl() { |
| super(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| protected EClass eStaticClass() { |
| return UTPPackage.Literals.TIME_OUT_MESSAGE; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public Message getBase_Message() { |
| if (base_Message != null && base_Message.eIsProxy()) { |
| InternalEObject oldBase_Message = (InternalEObject)base_Message; |
| base_Message = (Message)eResolveProxy(oldBase_Message); |
| if (base_Message != oldBase_Message) { |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.RESOLVE, UTPPackage.TIME_OUT_MESSAGE__BASE_MESSAGE, oldBase_Message, base_Message)); |
| } |
| } |
| return base_Message; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public Message basicGetBase_Message() { |
| return base_Message; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setBase_Message(Message newBase_Message) { |
| Message oldBase_Message = base_Message; |
| base_Message = newBase_Message; |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, UTPPackage.TIME_OUT_MESSAGE__BASE_MESSAGE, oldBase_Message, base_Message)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public Object eGet(int featureID, boolean resolve, boolean coreType) { |
| switch (featureID) { |
| case UTPPackage.TIME_OUT_MESSAGE__BASE_MESSAGE: |
| if (resolve) return getBase_Message(); |
| return basicGetBase_Message(); |
| } |
| 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.TIME_OUT_MESSAGE__BASE_MESSAGE: |
| setBase_Message((Message)newValue); |
| return; |
| } |
| super.eSet(featureID, newValue); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eUnset(int featureID) { |
| switch (featureID) { |
| case UTPPackage.TIME_OUT_MESSAGE__BASE_MESSAGE: |
| setBase_Message((Message)null); |
| return; |
| } |
| super.eUnset(featureID); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public boolean eIsSet(int featureID) { |
| switch (featureID) { |
| case UTPPackage.TIME_OUT_MESSAGE__BASE_MESSAGE: |
| return base_Message != 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>Time Out Message</b></em>'. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @return The cache adapter for this '<em><b>Time Out Message</b></em>'. |
| * @generated |
| */ |
| protected CacheAdapter getCacheAdapter() { |
| return CacheAdapter.getCacheAdapter(this); |
| } |
| |
| } //TimeOutMessageImpl |