| /******************************************************************************* |
| * Copyright (c) 2014 Bosch Software Innovations GmbH and others. |
| * All rights reserved. This program and the accompanying materials |
| * are made available under the terms of the Eclipse Public License v1.0 |
| * and Eclipse Distribution License v1.0 which accompany this distribution. |
| * |
| * The Eclipse Public License is available at |
| * http://www.eclipse.org/legal/epl-v10.html |
| * The Eclipse Distribution License is available at |
| * http://www.eclipse.org/org/documents/edl-v10.php. |
| * |
| * Contributors: |
| * Bosch Software Innovations GmbH - Please refer to git log |
| * |
| *******************************************************************************/ |
| /** |
| */ |
| package org.eclipse.vorto.functionblock.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.vorto.functionblock.FunctionblockPackage; |
| import org.eclipse.vorto.functionblock.ObjectParam; |
| import org.eclipse.vorto.functionblock.ObjectType; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * An implementation of the model object '<em><b>Object Param</b></em>'. |
| * <!-- end-user-doc --> |
| * <p> |
| * The following features are implemented: |
| * <ul> |
| * <li>{@link org.eclipse.vorto.functionblock.impl.ObjectParamImpl#getParamType <em>Param Type</em>}</li> |
| * </ul> |
| * </p> |
| * |
| * @generated |
| */ |
| public class ObjectParamImpl extends ParameterImpl implements ObjectParam { |
| /** |
| * The cached value of the '{@link #getParamType() <em>Param Type</em>}' reference. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getParamType() |
| * @generated |
| * @ordered |
| */ |
| protected ObjectType paramType; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected ObjectParamImpl() { |
| super(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| protected EClass eStaticClass() { |
| return FunctionblockPackage.Literals.OBJECT_PARAM; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public ObjectType getParamType() { |
| if (paramType != null && paramType.eIsProxy()) { |
| InternalEObject oldParamType = (InternalEObject)paramType; |
| paramType = (ObjectType)eResolveProxy(oldParamType); |
| if (paramType != oldParamType) { |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.RESOLVE, FunctionblockPackage.OBJECT_PARAM__PARAM_TYPE, oldParamType, paramType)); |
| } |
| } |
| return paramType; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public ObjectType basicGetParamType() { |
| return paramType; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setParamType(ObjectType newParamType) { |
| ObjectType oldParamType = paramType; |
| paramType = newParamType; |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, FunctionblockPackage.OBJECT_PARAM__PARAM_TYPE, oldParamType, paramType)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public Object eGet(int featureID, boolean resolve, boolean coreType) { |
| switch (featureID) { |
| case FunctionblockPackage.OBJECT_PARAM__PARAM_TYPE: |
| if (resolve) return getParamType(); |
| return basicGetParamType(); |
| } |
| return super.eGet(featureID, resolve, coreType); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eSet(int featureID, Object newValue) { |
| switch (featureID) { |
| case FunctionblockPackage.OBJECT_PARAM__PARAM_TYPE: |
| setParamType((ObjectType)newValue); |
| return; |
| } |
| super.eSet(featureID, newValue); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eUnset(int featureID) { |
| switch (featureID) { |
| case FunctionblockPackage.OBJECT_PARAM__PARAM_TYPE: |
| setParamType((ObjectType)null); |
| return; |
| } |
| super.eUnset(featureID); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public boolean eIsSet(int featureID) { |
| switch (featureID) { |
| case FunctionblockPackage.OBJECT_PARAM__PARAM_TYPE: |
| return paramType != null; |
| } |
| return super.eIsSet(featureID); |
| } |
| |
| } //ObjectParamImpl |