blob: 1a31702a0b932b8021028e799be439050cc48e56 [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.deprecatedelements.internal.impl;
import java.lang.reflect.InvocationTargetException;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.util.EList;
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.deprecatedelements.DeprecatedelementsPackage;
import org.eclipse.papyrus.sysml14.deprecatedelements.FlowSpecification;
import org.eclipse.uml2.uml.Interface;
import org.eclipse.uml2.uml.Property;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Flow Specification</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* </p>
* <ul>
* <li>{@link org.eclipse.papyrus.sysml14.deprecatedelements.internal.impl.FlowSpecificationImpl#getBase_Interface <em>Base Interface</em>}</li>
* </ul>
*
* @generated
*/
public class FlowSpecificationImpl extends MinimalEObjectImpl.Container implements FlowSpecification {
/**
* The cached value of the '{@link #getBase_Interface() <em>Base Interface</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getBase_Interface()
* @generated
* @ordered
*/
protected Interface base_Interface;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected FlowSpecificationImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return DeprecatedelementsPackage.Literals.FLOW_SPECIFICATION;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Interface getBase_Interface() {
if (base_Interface != null && base_Interface.eIsProxy()) {
InternalEObject oldBase_Interface = (InternalEObject)base_Interface;
base_Interface = (Interface)eResolveProxy(oldBase_Interface);
if (base_Interface != oldBase_Interface) {
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.RESOLVE, DeprecatedelementsPackage.FLOW_SPECIFICATION__BASE_INTERFACE, oldBase_Interface, base_Interface));
}
}
return base_Interface;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Interface basicGetBase_Interface() {
return base_Interface;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setBase_Interface(Interface newBase_Interface) {
Interface oldBase_Interface = base_Interface;
base_Interface = newBase_Interface;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, DeprecatedelementsPackage.FLOW_SPECIFICATION__BASE_INTERFACE, oldBase_Interface, base_Interface));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EList<Property> getFlowProperties() {
// TODO: implement this method
// Ensure that you remove @generated or mark it @generated NOT
throw new UnsupportedOperationException();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case DeprecatedelementsPackage.FLOW_SPECIFICATION__BASE_INTERFACE:
if (resolve) return getBase_Interface();
return basicGetBase_Interface();
}
return super.eGet(featureID, resolve, coreType);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case DeprecatedelementsPackage.FLOW_SPECIFICATION__BASE_INTERFACE:
setBase_Interface((Interface)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case DeprecatedelementsPackage.FLOW_SPECIFICATION__BASE_INTERFACE:
setBase_Interface((Interface)null);
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case DeprecatedelementsPackage.FLOW_SPECIFICATION__BASE_INTERFACE:
return base_Interface != null;
}
return super.eIsSet(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object eInvoke(int operationID, EList<?> arguments) throws InvocationTargetException {
switch (operationID) {
case DeprecatedelementsPackage.FLOW_SPECIFICATION___GET_FLOW_PROPERTIES:
return getFlowProperties();
}
return super.eInvoke(operationID, arguments);
}
} //FlowSpecificationImpl