/******************************************************************************* * Copyright (c) 2014, 2015 Willink Transformations 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: * E.D.Willink - initial API and implementation *******************************************************************************/ package org.eclipse.ocl.xtext.essentialoclcs.impl; import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.impl.ENotificationImpl; import org.eclipse.ocl.pivot.Property; import org.eclipse.ocl.xtext.essentialoclcs.EssentialOCLCSPackage; import org.eclipse.ocl.xtext.essentialoclcs.PropertyCallExpCS; /** * <!-- begin-user-doc --> * An implementation of the model object '<em><b>Property Call Exp CS</b></em>'. * <!-- end-user-doc --> * <p> * The following features are implemented: * </p> * <ul> * <li>{@link org.eclipse.ocl.xtext.essentialoclcs.impl.PropertyCallExpCSImpl#getReferredProperty <em>Referred Property</em>}</li> * </ul> * * @generated */ public abstract class PropertyCallExpCSImpl extends CallExpCSImpl implements PropertyCallExpCS { /** * The cached value of the '{@link #getReferredProperty() <em>Referred Property</em>}' reference. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getReferredProperty() * @generated * @ordered */ protected Property referredProperty; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected PropertyCallExpCSImpl() { super(); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override protected EClass eStaticClass() { return EssentialOCLCSPackage.Literals.PROPERTY_CALL_EXP_CS; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public Property getReferredProperty() { return referredProperty; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public void setReferredProperty(Property newReferredProperty) { Property oldReferredProperty = referredProperty; referredProperty = newReferredProperty; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, EssentialOCLCSPackage.PROPERTY_CALL_EXP_CS__REFERRED_PROPERTY, oldReferredProperty, referredProperty)); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case EssentialOCLCSPackage.PROPERTY_CALL_EXP_CS__REFERRED_PROPERTY: return getReferredProperty(); } return super.eGet(featureID, resolve, coreType); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case EssentialOCLCSPackage.PROPERTY_CALL_EXP_CS__REFERRED_PROPERTY: setReferredProperty((Property)newValue); return; } super.eSet(featureID, newValue); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case EssentialOCLCSPackage.PROPERTY_CALL_EXP_CS__REFERRED_PROPERTY: setReferredProperty((Property)null); return; } super.eUnset(featureID); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case EssentialOCLCSPackage.PROPERTY_CALL_EXP_CS__REFERRED_PROPERTY: return referredProperty != null; } return super.eIsSet(featureID); } } //PropertyCallExpCSImpl