blob: 9ff4ce5c0742e2fa248a04d15d1064154e5a9d87 [file] [log] [blame]
/**
* 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.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.sysml14.modelelements.Conform;
import org.eclipse.papyrus.sysml14.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.sysml14.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
*/
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
*/
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