| /** |
| */ |
| package org.eclipse.papyrus.RobotML.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.RobotML.OnVariable; |
| import org.eclipse.papyrus.RobotML.RobotMLPackage; |
| |
| import org.eclipse.uml2.uml.Parameter; |
| import org.eclipse.uml2.uml.Property; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * An implementation of the model object '<em><b>On Variable</b></em>'. |
| * <!-- end-user-doc --> |
| * <p> |
| * The following features are implemented: |
| * </p> |
| * <ul> |
| * <li>{@link org.eclipse.papyrus.RobotML.impl.OnVariableImpl#getProperty <em>Property</em>}</li> |
| * <li>{@link org.eclipse.papyrus.RobotML.impl.OnVariableImpl#getBase_Parameter <em>Base Parameter</em>}</li> |
| * </ul> |
| * |
| * @generated |
| */ |
| public class OnVariableImpl extends MinimalEObjectImpl.Container implements OnVariable { |
| /** |
| * The cached value of the '{@link #getProperty() <em>Property</em>}' reference. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getProperty() |
| * @generated |
| * @ordered |
| */ |
| protected Property property; |
| |
| /** |
| * 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 OnVariableImpl() { |
| super(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| protected EClass eStaticClass() { |
| return RobotMLPackage.Literals.ON_VARIABLE; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public Property getProperty() { |
| if (property != null && property.eIsProxy()) { |
| InternalEObject oldProperty = (InternalEObject)property; |
| property = (Property)eResolveProxy(oldProperty); |
| if (property != oldProperty) { |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.RESOLVE, RobotMLPackage.ON_VARIABLE__PROPERTY, oldProperty, property)); |
| } |
| } |
| return property; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public Property basicGetProperty() { |
| return property; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setProperty(Property newProperty) { |
| Property oldProperty = property; |
| property = newProperty; |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, RobotMLPackage.ON_VARIABLE__PROPERTY, oldProperty, property)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| 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, RobotMLPackage.ON_VARIABLE__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 |
| */ |
| public void setBase_Parameter(Parameter newBase_Parameter) { |
| Parameter oldBase_Parameter = base_Parameter; |
| base_Parameter = newBase_Parameter; |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, RobotMLPackage.ON_VARIABLE__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 RobotMLPackage.ON_VARIABLE__PROPERTY: |
| if (resolve) return getProperty(); |
| return basicGetProperty(); |
| case RobotMLPackage.ON_VARIABLE__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 RobotMLPackage.ON_VARIABLE__PROPERTY: |
| setProperty((Property)newValue); |
| return; |
| case RobotMLPackage.ON_VARIABLE__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 RobotMLPackage.ON_VARIABLE__PROPERTY: |
| setProperty((Property)null); |
| return; |
| case RobotMLPackage.ON_VARIABLE__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 RobotMLPackage.ON_VARIABLE__PROPERTY: |
| return property != null; |
| case RobotMLPackage.ON_VARIABLE__BASE_PARAMETER: |
| return base_Parameter != null; |
| } |
| return super.eIsSet(featureID); |
| } |
| |
| } //OnVariableImpl |