blob: 01245ff2263f5ced41a0e7b41d2b896d0ec4c523 [file] [log] [blame]
/*
* Copyright (c) 2014 CEA and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Kenn Hussey (CEA) - initial API and implementation
*
*/
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.Abstraction;
import org.eclipse.uml2.uml.profile.standard.Refine;
import org.eclipse.uml2.uml.profile.standard.StandardPackage;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Refine</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* <ul>
* <li>{@link org.eclipse.uml2.uml.profile.standard.internal.impl.RefineImpl#getBase_Abstraction <em>Base Abstraction</em>}</li>
* </ul>
* </p>
*
* @generated
*/
public class RefineImpl
extends EObjectImpl
implements Refine {
/**
* The cached value of the '{@link #getBase_Abstraction() <em>Base Abstraction</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getBase_Abstraction()
* @generated
* @ordered
*/
protected Abstraction base_Abstraction;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected RefineImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return StandardPackage.Literals.REFINE;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Abstraction getBase_Abstraction() {
if (base_Abstraction != null && base_Abstraction.eIsProxy()) {
InternalEObject oldBase_Abstraction = (InternalEObject) base_Abstraction;
base_Abstraction = (Abstraction) eResolveProxy(oldBase_Abstraction);
if (base_Abstraction != oldBase_Abstraction) {
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.RESOLVE,
StandardPackage.REFINE__BASE_ABSTRACTION,
oldBase_Abstraction, base_Abstraction));
}
}
return base_Abstraction;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Abstraction basicGetBase_Abstraction() {
return base_Abstraction;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setBase_Abstraction(Abstraction newBase_Abstraction) {
Abstraction oldBase_Abstraction = base_Abstraction;
base_Abstraction = newBase_Abstraction;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET,
StandardPackage.REFINE__BASE_ABSTRACTION, oldBase_Abstraction,
base_Abstraction));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case StandardPackage.REFINE__BASE_ABSTRACTION :
if (resolve)
return getBase_Abstraction();
return basicGetBase_Abstraction();
}
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.REFINE__BASE_ABSTRACTION :
setBase_Abstraction((Abstraction) newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case StandardPackage.REFINE__BASE_ABSTRACTION :
setBase_Abstraction((Abstraction) null);
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case StandardPackage.REFINE__BASE_ABSTRACTION :
return base_Abstraction != null;
}
return super.eIsSet(featureID);
}
} //RefineImpl