/** | |
* Copyright (c)2020 CEA LIST, Committer Name, and others. | |
* | |
* All rights reserved. This program and the accompanying materials | |
* are made available under the terms of the Eclipse Public License 2.0 | |
* which accompanies this distribution, and is available at | |
* https://www.eclipse.org/legal/epl-2.0/ | |
* | |
* SPDX-License-Identifier: EPL-2.0 | |
* | |
* Contributors: | |
* CEA LIST - Initial API and implementation | |
* Gabriel Pedroza (CEA LIST) gabriel.pedroza@cea.fr | |
* Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr | |
* | |
*/ | |
package org.eclipse.papyrus.pdp4eng.designer.profile.pdp4engDesign.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.MinimalEObjectImpl; | |
import org.eclipse.papyrus.pdp4eng.designer.profile.pdp4engDesign.DataInput; | |
import org.eclipse.papyrus.pdp4eng.designer.profile.pdp4engDesign.pdp4engDesignPackage; | |
import org.eclipse.uml2.uml.InputPin; | |
import org.eclipse.uml2.uml.Parameter; | |
/** | |
* <!-- begin-user-doc --> | |
* An implementation of the model object '<em><b>Data Input</b></em>'. | |
* <!-- end-user-doc --> | |
* <p> | |
* The following features are implemented: | |
* </p> | |
* <ul> | |
* <li>{@link org.eclipse.papyrus.pdp4eng.designer.profile.pdp4engDesign.impl.DataInputImpl#getBase_InputPin <em>Base Input Pin</em>}</li> | |
* <li>{@link org.eclipse.papyrus.pdp4eng.designer.profile.pdp4engDesign.impl.DataInputImpl#getBase_Parameter <em>Base Parameter</em>}</li> | |
* </ul> | |
* | |
* @generated | |
*/ | |
public class DataInputImpl extends MinimalEObjectImpl.Container implements DataInput { | |
/** | |
* The cached value of the '{@link #getBase_InputPin() <em>Base Input Pin</em>}' reference. | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @see #getBase_InputPin() | |
* @generated | |
* @ordered | |
*/ | |
protected InputPin base_InputPin; | |
/** | |
* The cached value of the '{@link #getBase_Parameter() <em>Base Parameter</em>}' reference. | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @see #getBase_Parameter() | |
* @generated | |
* @ordered | |
*/ | |
protected Parameter base_Parameter; | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
protected DataInputImpl() { | |
super(); | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
@Override | |
protected EClass eStaticClass() { | |
return pdp4engDesignPackage.Literals.DATA_INPUT; | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
@Override | |
public InputPin getBase_InputPin() { | |
if (base_InputPin != null && base_InputPin.eIsProxy()) { | |
InternalEObject oldBase_InputPin = (InternalEObject)base_InputPin; | |
base_InputPin = (InputPin)eResolveProxy(oldBase_InputPin); | |
if (base_InputPin != oldBase_InputPin) { | |
if (eNotificationRequired()) | |
eNotify(new ENotificationImpl(this, Notification.RESOLVE, pdp4engDesignPackage.DATA_INPUT__BASE_INPUT_PIN, oldBase_InputPin, base_InputPin)); | |
} | |
} | |
return base_InputPin; | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
public InputPin basicGetBase_InputPin() { | |
return base_InputPin; | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
@Override | |
public void setBase_InputPin(InputPin newBase_InputPin) { | |
InputPin oldBase_InputPin = base_InputPin; | |
base_InputPin = newBase_InputPin; | |
if (eNotificationRequired()) | |
eNotify(new ENotificationImpl(this, Notification.SET, pdp4engDesignPackage.DATA_INPUT__BASE_INPUT_PIN, oldBase_InputPin, base_InputPin)); | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
@Override | |
public Parameter getBase_Parameter() { | |
if (base_Parameter != null && base_Parameter.eIsProxy()) { | |
InternalEObject oldBase_Parameter = (InternalEObject)base_Parameter; | |
base_Parameter = (Parameter)eResolveProxy(oldBase_Parameter); | |
if (base_Parameter != oldBase_Parameter) { | |
if (eNotificationRequired()) | |
eNotify(new ENotificationImpl(this, Notification.RESOLVE, pdp4engDesignPackage.DATA_INPUT__BASE_PARAMETER, oldBase_Parameter, base_Parameter)); | |
} | |
} | |
return base_Parameter; | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
public Parameter basicGetBase_Parameter() { | |
return base_Parameter; | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
@Override | |
public void setBase_Parameter(Parameter newBase_Parameter) { | |
Parameter oldBase_Parameter = base_Parameter; | |
base_Parameter = newBase_Parameter; | |
if (eNotificationRequired()) | |
eNotify(new ENotificationImpl(this, Notification.SET, pdp4engDesignPackage.DATA_INPUT__BASE_PARAMETER, oldBase_Parameter, base_Parameter)); | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
@Override | |
public Object eGet(int featureID, boolean resolve, boolean coreType) { | |
switch (featureID) { | |
case pdp4engDesignPackage.DATA_INPUT__BASE_INPUT_PIN: | |
if (resolve) return getBase_InputPin(); | |
return basicGetBase_InputPin(); | |
case pdp4engDesignPackage.DATA_INPUT__BASE_PARAMETER: | |
if (resolve) return getBase_Parameter(); | |
return basicGetBase_Parameter(); | |
} | |
return super.eGet(featureID, resolve, coreType); | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
@Override | |
public void eSet(int featureID, Object newValue) { | |
switch (featureID) { | |
case pdp4engDesignPackage.DATA_INPUT__BASE_INPUT_PIN: | |
setBase_InputPin((InputPin)newValue); | |
return; | |
case pdp4engDesignPackage.DATA_INPUT__BASE_PARAMETER: | |
setBase_Parameter((Parameter)newValue); | |
return; | |
} | |
super.eSet(featureID, newValue); | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
@Override | |
public void eUnset(int featureID) { | |
switch (featureID) { | |
case pdp4engDesignPackage.DATA_INPUT__BASE_INPUT_PIN: | |
setBase_InputPin((InputPin)null); | |
return; | |
case pdp4engDesignPackage.DATA_INPUT__BASE_PARAMETER: | |
setBase_Parameter((Parameter)null); | |
return; | |
} | |
super.eUnset(featureID); | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
@Override | |
public boolean eIsSet(int featureID) { | |
switch (featureID) { | |
case pdp4engDesignPackage.DATA_INPUT__BASE_INPUT_PIN: | |
return base_InputPin != null; | |
case pdp4engDesignPackage.DATA_INPUT__BASE_PARAMETER: | |
return base_Parameter != null; | |
} | |
return super.eIsSet(featureID); | |
} | |
} //DataInputImpl |