blob: 89f925d673b410b3ffedec205db519c7bf27fd31 [file] [log] [blame]
/*
* Copyright (c) 2014, 2018 CEA and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v20.html
*
* Contributors:
* Kenn Hussey (CEA) - initial API and implementation
* Kenn Hussey (CEA) - 451350
* Kenn Hussey - 535301
*
*/
package org.eclipse.uml2.uml.profile.standard.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.EObjectImpl;
import org.eclipse.uml2.uml.BehavioralFeature;
import org.eclipse.uml2.uml.profile.standard.Destroy;
import org.eclipse.uml2.uml.profile.standard.StandardPackage;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Destroy</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* </p>
* <ul>
* <li>{@link org.eclipse.uml2.uml.profile.standard.internal.impl.DestroyImpl#getBase_BehavioralFeature <em>Base Behavioral Feature</em>}</li>
* </ul>
*
* @generated
*/
public class DestroyImpl
extends EObjectImpl
implements Destroy {
/**
* The cached value of the '{@link #getBase_BehavioralFeature() <em>Base Behavioral Feature</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getBase_BehavioralFeature()
* @generated
* @ordered
*/
protected BehavioralFeature base_BehavioralFeature;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected DestroyImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return StandardPackage.Literals.DESTROY;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public BehavioralFeature getBase_BehavioralFeature() {
if (base_BehavioralFeature != null
&& base_BehavioralFeature.eIsProxy()) {
InternalEObject oldBase_BehavioralFeature = (InternalEObject) base_BehavioralFeature;
base_BehavioralFeature = (BehavioralFeature) eResolveProxy(
oldBase_BehavioralFeature);
if (base_BehavioralFeature != oldBase_BehavioralFeature) {
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.RESOLVE,
StandardPackage.DESTROY__BASE_BEHAVIORAL_FEATURE,
oldBase_BehavioralFeature, base_BehavioralFeature));
}
}
return base_BehavioralFeature;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public BehavioralFeature basicGetBase_BehavioralFeature() {
return base_BehavioralFeature;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setBase_BehavioralFeature(
BehavioralFeature newBase_BehavioralFeature) {
BehavioralFeature oldBase_BehavioralFeature = base_BehavioralFeature;
base_BehavioralFeature = newBase_BehavioralFeature;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET,
StandardPackage.DESTROY__BASE_BEHAVIORAL_FEATURE,
oldBase_BehavioralFeature, base_BehavioralFeature));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case StandardPackage.DESTROY__BASE_BEHAVIORAL_FEATURE :
if (resolve)
return getBase_BehavioralFeature();
return basicGetBase_BehavioralFeature();
}
return super.eGet(featureID, resolve, coreType);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case StandardPackage.DESTROY__BASE_BEHAVIORAL_FEATURE :
setBase_BehavioralFeature((BehavioralFeature) newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case StandardPackage.DESTROY__BASE_BEHAVIORAL_FEATURE :
setBase_BehavioralFeature((BehavioralFeature) null);
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case StandardPackage.DESTROY__BASE_BEHAVIORAL_FEATURE :
return base_BehavioralFeature != null;
}
return super.eIsSet(featureID);
}
} //DestroyImpl