blob: 01c36041911b3150bc6c2e9add3a850153358388 [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2006, 2018 IBM Corporation, Zeligsoft Inc., and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v20.html
*
* Contributors:
* IBM - Initial API and implementation
* Zeligsoft - Bug 241426
*******************************************************************************/
package org.eclipse.ocl.ecore.impl;
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;
import org.eclipse.emf.ecore.impl.EObjectImpl;
import org.eclipse.ocl.ecore.EcorePackage;
import org.eclipse.ocl.ecore.SendSignalAction;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Send Signal Action</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* </p>
* <ul>
* <li>{@link org.eclipse.ocl.ecore.impl.SendSignalActionImpl#getSignal <em>Signal</em>}</li>
* </ul>
*
* @generated
*/
public class SendSignalActionImpl
extends EObjectImpl
implements SendSignalAction {
/**
* The cached value of the '{@link #getSignal() <em>Signal</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getSignal()
* @generated
* @ordered
*/
protected EClass signal;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected SendSignalActionImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return EcorePackage.Literals.SEND_SIGNAL_ACTION;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getSignal() {
if (signal != null && signal.eIsProxy()) {
InternalEObject oldSignal = (InternalEObject) signal;
signal = (EClass) eResolveProxy(oldSignal);
if (signal != oldSignal) {
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.RESOLVE,
EcorePackage.SEND_SIGNAL_ACTION__SIGNAL, oldSignal,
signal));
}
}
return signal;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass basicGetSignal() {
return signal;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setSignal(EClass newSignal) {
EClass oldSignal = signal;
signal = newSignal;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET,
EcorePackage.SEND_SIGNAL_ACTION__SIGNAL, oldSignal, signal));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case EcorePackage.SEND_SIGNAL_ACTION__SIGNAL :
if (resolve)
return getSignal();
return basicGetSignal();
}
return super.eGet(featureID, resolve, coreType);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case EcorePackage.SEND_SIGNAL_ACTION__SIGNAL :
setSignal((EClass) newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case EcorePackage.SEND_SIGNAL_ACTION__SIGNAL :
setSignal((EClass) null);
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case EcorePackage.SEND_SIGNAL_ACTION__SIGNAL :
return signal != null;
}
return super.eIsSet(featureID);
}
} //SendSignalActionImpl