| /** |
| * Copyright (c) 2015 CEA LIST. |
| * |
| * 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: |
| * Benoit Maggi (CEA LIST) benoit.maggi@cea.fr - Initial API and implementation |
| * |
| */ |
| package org.eclipse.papyrus.sysml14.blocks.internal.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.sysml14.blocks.BlocksPackage; |
| import org.eclipse.papyrus.sysml14.blocks.PropertySpecificType; |
| |
| import org.eclipse.uml2.uml.Classifier; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * An implementation of the model object '<em><b>Property Specific Type</b></em>'. |
| * <!-- end-user-doc --> |
| * <p> |
| * The following features are implemented: |
| * </p> |
| * <ul> |
| * <li>{@link org.eclipse.papyrus.sysml14.blocks.internal.impl.PropertySpecificTypeImpl#getBase_Classifier <em>Base Classifier</em>}</li> |
| * </ul> |
| * |
| * @generated |
| */ |
| public class PropertySpecificTypeImpl extends MinimalEObjectImpl.Container implements PropertySpecificType { |
| /** |
| * The cached value of the '{@link #getBase_Classifier() <em>Base Classifier</em>}' reference. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getBase_Classifier() |
| * @generated |
| * @ordered |
| */ |
| protected Classifier base_Classifier; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected PropertySpecificTypeImpl() { |
| super(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| protected EClass eStaticClass() { |
| return BlocksPackage.Literals.PROPERTY_SPECIFIC_TYPE; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public Classifier getBase_Classifier() { |
| if (base_Classifier != null && base_Classifier.eIsProxy()) { |
| InternalEObject oldBase_Classifier = (InternalEObject)base_Classifier; |
| base_Classifier = (Classifier)eResolveProxy(oldBase_Classifier); |
| if (base_Classifier != oldBase_Classifier) { |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.RESOLVE, BlocksPackage.PROPERTY_SPECIFIC_TYPE__BASE_CLASSIFIER, oldBase_Classifier, base_Classifier)); |
| } |
| } |
| return base_Classifier; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public Classifier basicGetBase_Classifier() { |
| return base_Classifier; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setBase_Classifier(Classifier newBase_Classifier) { |
| Classifier oldBase_Classifier = base_Classifier; |
| base_Classifier = newBase_Classifier; |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, BlocksPackage.PROPERTY_SPECIFIC_TYPE__BASE_CLASSIFIER, oldBase_Classifier, base_Classifier)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public Object eGet(int featureID, boolean resolve, boolean coreType) { |
| switch (featureID) { |
| case BlocksPackage.PROPERTY_SPECIFIC_TYPE__BASE_CLASSIFIER: |
| if (resolve) return getBase_Classifier(); |
| return basicGetBase_Classifier(); |
| } |
| return super.eGet(featureID, resolve, coreType); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eSet(int featureID, Object newValue) { |
| switch (featureID) { |
| case BlocksPackage.PROPERTY_SPECIFIC_TYPE__BASE_CLASSIFIER: |
| setBase_Classifier((Classifier)newValue); |
| return; |
| } |
| super.eSet(featureID, newValue); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eUnset(int featureID) { |
| switch (featureID) { |
| case BlocksPackage.PROPERTY_SPECIFIC_TYPE__BASE_CLASSIFIER: |
| setBase_Classifier((Classifier)null); |
| return; |
| } |
| super.eUnset(featureID); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public boolean eIsSet(int featureID) { |
| switch (featureID) { |
| case BlocksPackage.PROPERTY_SPECIFIC_TYPE__BASE_CLASSIFIER: |
| return base_Classifier != null; |
| } |
| return super.eIsSet(featureID); |
| } |
| |
| } //PropertySpecificTypeImpl |