blob: ec54e6102cefce9abf96cb7b4e04381e965d48b8 [file] [log] [blame]
/**
* Copyright (c) 2019 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:
* Nicolas FAUVERGUE (CEA LIST) nicolas.fauvergue@cea.fr - Initial API and implementation
*/
package org.eclipse.papyrus.sysml16.modelelements.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.sysml16.modelelements.Conform;
import org.eclipse.papyrus.sysml16.modelelements.ModelElementsPackage;
import org.eclipse.uml2.uml.Generalization;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Conform</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* </p>
* <ul>
* <li>{@link org.eclipse.papyrus.sysml16.modelelements.internal.impl.ConformImpl#getBase_Generalization <em>Base Generalization</em>}</li>
* </ul>
*
* @generated
*/
public class ConformImpl extends MinimalEObjectImpl.Container implements Conform {
/**
* The cached value of the '{@link #getBase_Generalization() <em>Base Generalization</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getBase_Generalization()
* @generated
* @ordered
*/
protected Generalization base_Generalization;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected ConformImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return ModelElementsPackage.Literals.CONFORM;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Generalization getBase_Generalization() {
if (base_Generalization != null && base_Generalization.eIsProxy()) {
InternalEObject oldBase_Generalization = (InternalEObject)base_Generalization;
base_Generalization = (Generalization)eResolveProxy(oldBase_Generalization);
if (base_Generalization != oldBase_Generalization) {
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.RESOLVE, ModelElementsPackage.CONFORM__BASE_GENERALIZATION, oldBase_Generalization, base_Generalization));
}
}
return base_Generalization;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Generalization basicGetBase_Generalization() {
return base_Generalization;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void setBase_Generalization(Generalization newBase_Generalization) {
Generalization oldBase_Generalization = base_Generalization;
base_Generalization = newBase_Generalization;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, ModelElementsPackage.CONFORM__BASE_GENERALIZATION, oldBase_Generalization, base_Generalization));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case ModelElementsPackage.CONFORM__BASE_GENERALIZATION:
if (resolve) return getBase_Generalization();
return basicGetBase_Generalization();
}
return super.eGet(featureID, resolve, coreType);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case ModelElementsPackage.CONFORM__BASE_GENERALIZATION:
setBase_Generalization((Generalization)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case ModelElementsPackage.CONFORM__BASE_GENERALIZATION:
setBase_Generalization((Generalization)null);
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case ModelElementsPackage.CONFORM__BASE_GENERALIZATION:
return base_Generalization != null;
}
return super.eIsSet(featureID);
}
} //ConformImpl