All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.eclipse.ocl.expressions.impl.NavigationCallExpImpl Maven / Gradle / Ivy

/**
 * 
 * 
 * Copyright (c) 2006, 2008 IBM Corporation, Zeligsoft Inc., 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:
 *   IBM - Initial API and implementation
 *   Zeligsoft - Bug 207365
 * 
 * 
 *
 * $Id: NavigationCallExpImpl.java,v 1.5 2008/10/12 01:09:49 cdamus Exp $
 */
package org.eclipse.ocl.expressions.impl;

import java.util.Collection;

import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.notify.NotificationChain;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.InternalEObject;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.emf.ecore.util.EObjectContainmentEList;
import org.eclipse.emf.ecore.util.InternalEList;
import org.eclipse.ocl.expressions.ExpressionsPackage;
import org.eclipse.ocl.expressions.NavigationCallExp;
import org.eclipse.ocl.expressions.OCLExpression;

/**
 * 
 * An implementation of the model object 'Navigation Call Exp'.
 * 
 * 

* The following features are implemented: *

    *
  • {@link org.eclipse.ocl.expressions.impl.NavigationCallExpImpl#getQualifier Qualifier}
  • *
  • {@link org.eclipse.ocl.expressions.impl.NavigationCallExpImpl#getNavigationSource Navigation Source}
  • *
*

* * @generated */ public abstract class NavigationCallExpImpl extends FeatureCallExpImpl implements NavigationCallExp { /** * The cached value of the '{@link #getQualifier() Qualifier}' containment reference list. * * * @see #getQualifier() * @generated * @ordered */ protected EList> qualifier; /** * The cached value of the '{@link #getNavigationSource() Navigation Source}' reference. * * * @see #getNavigationSource() * @generated * @ordered */ protected P navigationSource; /** * * * @generated */ protected NavigationCallExpImpl() { super(); } /** * * * @generated */ @Override protected EClass eStaticClass() { return ExpressionsPackage.Literals.NAVIGATION_CALL_EXP; } /** * * * @generated */ public EList> getQualifier() { if (qualifier == null) { qualifier = new EObjectContainmentEList>( OCLExpression.class, this, ExpressionsPackage.NAVIGATION_CALL_EXP__QUALIFIER); } return qualifier; } /** * * * @generated */ @SuppressWarnings("unchecked") public P getNavigationSource() { if (navigationSource != null && ((EObject) navigationSource).eIsProxy()) { InternalEObject oldNavigationSource = (InternalEObject) navigationSource; navigationSource = (P) eResolveProxy(oldNavigationSource); if (navigationSource != oldNavigationSource) { if (eNotificationRequired()) eNotify(new ENotificationImpl( this, Notification.RESOLVE, ExpressionsPackage.NAVIGATION_CALL_EXP__NAVIGATION_SOURCE, oldNavigationSource, navigationSource)); } } return navigationSource; } /** * * * @generated */ public P basicGetNavigationSource() { return navigationSource; } /** * * * @generated */ public void setNavigationSource(P newNavigationSource) { P oldNavigationSource = navigationSource; navigationSource = newNavigationSource; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, ExpressionsPackage.NAVIGATION_CALL_EXP__NAVIGATION_SOURCE, oldNavigationSource, navigationSource)); } /** * * * @generated */ @Override public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { switch (featureID) { case ExpressionsPackage.NAVIGATION_CALL_EXP__QUALIFIER : return ((InternalEList) getQualifier()).basicRemove( otherEnd, msgs); } return super.eInverseRemove(otherEnd, featureID, msgs); } /** * * * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case ExpressionsPackage.NAVIGATION_CALL_EXP__QUALIFIER : return getQualifier(); case ExpressionsPackage.NAVIGATION_CALL_EXP__NAVIGATION_SOURCE : if (resolve) return getNavigationSource(); return basicGetNavigationSource(); } return super.eGet(featureID, resolve, coreType); } /** * * * @generated */ @SuppressWarnings("unchecked") @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case ExpressionsPackage.NAVIGATION_CALL_EXP__QUALIFIER : getQualifier().clear(); getQualifier().addAll( (Collection>) newValue); return; case ExpressionsPackage.NAVIGATION_CALL_EXP__NAVIGATION_SOURCE : setNavigationSource((P) newValue); return; } super.eSet(featureID, newValue); } /** * * * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case ExpressionsPackage.NAVIGATION_CALL_EXP__QUALIFIER : getQualifier().clear(); return; case ExpressionsPackage.NAVIGATION_CALL_EXP__NAVIGATION_SOURCE : setNavigationSource((P) null); return; } super.eUnset(featureID); } /** * * * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case ExpressionsPackage.NAVIGATION_CALL_EXP__QUALIFIER : return qualifier != null && !qualifier.isEmpty(); case ExpressionsPackage.NAVIGATION_CALL_EXP__NAVIGATION_SOURCE : return navigationSource != null; } return super.eIsSet(featureID); } } //NavigationCallExpImpl




© 2015 - 2024 Weber Informatics LLC | Privacy Policy