blob: ac794725c9d833b7c73b6c3bb22167500769dfe1 [file] [log] [blame]
/**
* *******************************************************************************
* Copyright (c) 2015-2021 Robert Bosch GmbH and others.
*
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*
* Generated using Eclipse EMF
*
* *******************************************************************************
*/
package org.eclipse.app4mc.amalthea.model.impl;
import java.lang.reflect.InvocationTargetException;
import org.eclipse.app4mc.amalthea.model.AmaltheaPackage;
import org.eclipse.app4mc.amalthea.model.HwAccessElement;
import org.eclipse.app4mc.amalthea.model.HwDestination;
import org.eclipse.app4mc.amalthea.model.HwPath;
import org.eclipse.app4mc.amalthea.model.ProcessingUnit;
import org.eclipse.app4mc.amalthea.model.emf.AmaltheaEObjectImpl;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.InternalEObject;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Hw Path</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* </p>
* <ul>
* <li>{@link org.eclipse.app4mc.amalthea.model.impl.HwPathImpl#getSource <em>Source</em>}</li>
* <li>{@link org.eclipse.app4mc.amalthea.model.impl.HwPathImpl#getDestination <em>Destination</em>}</li>
* </ul>
*
* @generated
*/
public abstract class HwPathImpl extends AmaltheaEObjectImpl implements HwPath {
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected HwPathImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return AmaltheaPackage.eINSTANCE.getHwPath();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public ProcessingUnit getSource() {
ProcessingUnit source = basicGetSource();
return source != null && source.eIsProxy() ? (ProcessingUnit)eResolveProxy((InternalEObject)source) : source;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public ProcessingUnit basicGetSource() {
return this.getContainingAccessElement().getSource();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public HwDestination getDestination() {
HwDestination destination = basicGetDestination();
return destination != null && destination.eIsProxy() ? (HwDestination)eResolveProxy((InternalEObject)destination) : destination;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public HwDestination basicGetDestination() {
return this.getContainingAccessElement().getDestination();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public HwAccessElement getContainingAccessElement() {
return null;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case AmaltheaPackage.HW_PATH__SOURCE:
if (resolve) return getSource();
return basicGetSource();
case AmaltheaPackage.HW_PATH__DESTINATION:
if (resolve) return getDestination();
return basicGetDestination();
}
return super.eGet(featureID, resolve, coreType);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case AmaltheaPackage.HW_PATH__SOURCE:
return basicGetSource() != null;
case AmaltheaPackage.HW_PATH__DESTINATION:
return basicGetDestination() != 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 AmaltheaPackage.HW_PATH___GET_CONTAINING_ACCESS_ELEMENT:
return getContainingAccessElement();
}
return super.eInvoke(operationID, arguments);
}
} //HwPathImpl