| /** |
| * |
| * Copyright (c) 2011, 2016 - Loetz GmbH&Co.KG (69115 Heidelberg, Germany) |
| * |
| * 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: |
| * Christophe Loetz (Loetz GmbH&Co.KG) - initial implementation |
| * |
| */ |
| package org.eclipse.osbp.ecview.core.common.model.binding.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.osbp.ecview.core.common.model.binding.BindingPackage; |
| import org.eclipse.osbp.ecview.core.common.model.binding.YNoOpListBindingEndpoint; |
| import org.eclipse.osbp.ecview.core.common.model.core.YElement; |
| |
| // TODO: Auto-generated Javadoc |
| /** |
| * <!-- begin-user-doc --> An implementation of the model object ' |
| * <em><b>YNo Op List Binding Endpoint</b></em>'. <!-- end-user-doc --> |
| * <p> |
| * The following features are implemented: |
| * </p> |
| * <ul> |
| * <li>{@link org.eclipse.osbp.ecview.core.common.model.binding.impl.YNoOpListBindingEndpointImpl#getElement <em>Element</em>}</li> |
| * </ul> |
| * |
| * @generated |
| */ |
| public class YNoOpListBindingEndpointImpl extends YListBindingEndpointImpl |
| implements YNoOpListBindingEndpoint { |
| /** |
| * The cached value of the '{@link #getElement() <em>Element</em>}' reference. |
| * <!-- begin-user-doc --> <!-- end-user-doc --> |
| * @see #getElement() |
| * @generated |
| * @ordered |
| */ |
| protected YElement element; |
| |
| /** |
| * <!-- begin-user-doc --> <!-- end-user-doc -->. |
| * |
| * @generated |
| */ |
| protected YNoOpListBindingEndpointImpl() { |
| super(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> <!-- end-user-doc -->. |
| * |
| * @return the e class |
| * @generated |
| */ |
| @Override |
| protected EClass eStaticClass() { |
| return BindingPackage.Literals.YNO_OP_LIST_BINDING_ENDPOINT; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> <!-- end-user-doc -->. |
| * |
| * @return the cached value of the '{@link #getElement() <em>Element</em>}' |
| * reference |
| * @generated |
| */ |
| public YElement getElement() { |
| if (element != null && element.eIsProxy()) { |
| InternalEObject oldElement = (InternalEObject)element; |
| element = (YElement)eResolveProxy(oldElement); |
| if (element != oldElement) { |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.RESOLVE, BindingPackage.YNO_OP_LIST_BINDING_ENDPOINT__ELEMENT, oldElement, element)); |
| } |
| } |
| return element; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> <!-- end-user-doc -->. |
| * |
| * @return the y element |
| * @generated |
| */ |
| public YElement basicGetElement() { |
| return element; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> <!-- end-user-doc -->. |
| * |
| * @param newElement |
| * the new cached value of the '{@link #getElement() |
| * <em>Element</em>}' reference |
| * @generated |
| */ |
| public void setElement(YElement newElement) { |
| YElement oldElement = element; |
| element = newElement; |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, BindingPackage.YNO_OP_LIST_BINDING_ENDPOINT__ELEMENT, oldElement, element)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> <!-- end-user-doc -->. |
| * |
| * @param featureID |
| * the feature id |
| * @param resolve |
| * the resolve |
| * @param coreType |
| * the core type |
| * @return the object |
| * @generated |
| */ |
| @Override |
| public Object eGet(int featureID, boolean resolve, boolean coreType) { |
| switch (featureID) { |
| case BindingPackage.YNO_OP_LIST_BINDING_ENDPOINT__ELEMENT: |
| if (resolve) return getElement(); |
| return basicGetElement(); |
| } |
| return super.eGet(featureID, resolve, coreType); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> <!-- end-user-doc -->. |
| * |
| * @param featureID |
| * the feature id |
| * @param newValue |
| * the new value |
| * @generated |
| */ |
| @Override |
| public void eSet(int featureID, Object newValue) { |
| switch (featureID) { |
| case BindingPackage.YNO_OP_LIST_BINDING_ENDPOINT__ELEMENT: |
| setElement((YElement)newValue); |
| return; |
| } |
| super.eSet(featureID, newValue); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> <!-- end-user-doc -->. |
| * |
| * @param featureID |
| * the feature id |
| * @generated |
| */ |
| @Override |
| public void eUnset(int featureID) { |
| switch (featureID) { |
| case BindingPackage.YNO_OP_LIST_BINDING_ENDPOINT__ELEMENT: |
| setElement((YElement)null); |
| return; |
| } |
| super.eUnset(featureID); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> <!-- end-user-doc -->. |
| * |
| * @param featureID |
| * the feature id |
| * @return true, if successful |
| * @generated |
| */ |
| @Override |
| public boolean eIsSet(int featureID) { |
| switch (featureID) { |
| case BindingPackage.YNO_OP_LIST_BINDING_ENDPOINT__ELEMENT: |
| return element != null; |
| } |
| return super.eIsSet(featureID); |
| } |
| |
| /* (non-Javadoc) |
| * @see org.eclipse.osbp.ecview.core.common.model.binding.impl.YBindingEndpointImpl#isBindsElement(org.eclipse.osbp.ecview.core.common.model.core.YElement) |
| */ |
| @Override |
| public boolean isBindsElement(YElement element) { |
| return false; |
| } |
| |
| } // YNoOpListBindingEndpointImpl |