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

org.openxma.dsl.dom.model.impl.FunctionCallImpl Maven / Gradle / Ivy

/**
 * 
 * 
 *
 * $Id$
 */
package org.openxma.dsl.dom.model.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.InternalEObject;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.emf.ecore.util.EObjectContainmentEList;
import org.eclipse.emf.ecore.util.InternalEList;
import org.openxma.dsl.dom.DomPackage;
import org.openxma.dsl.dom.model.Expression;
import org.openxma.dsl.dom.model.FunctionCall;

/**
 * 
 * An implementation of the model object 'Function Call'.
 * 
 * 

* The following features are implemented: *

    *
  • {@link org.openxma.dsl.dom.model.impl.FunctionCallImpl#getFunction Function}
  • *
  • {@link org.openxma.dsl.dom.model.impl.FunctionCallImpl#getArguments Arguments}
  • *
*

* * @generated */ public class FunctionCallImpl extends ExpressionImpl implements FunctionCall { /** * The default value of the '{@link #getFunction() Function}' attribute. * * * @see #getFunction() * @generated * @ordered */ protected static final String FUNCTION_EDEFAULT = null; /** * The cached value of the '{@link #getFunction() Function}' attribute. * * * @see #getFunction() * @generated * @ordered */ protected String function = FUNCTION_EDEFAULT; /** * The cached value of the '{@link #getArguments() Arguments}' containment reference list. * * * @see #getArguments() * @generated * @ordered */ protected EList arguments; /** * * * @generated */ protected FunctionCallImpl() { super(); } /** * * * @generated */ @Override protected EClass eStaticClass() { return DomPackage.Literals.FUNCTION_CALL; } /** * * * @generated */ public String getFunction() { return function; } /** * * * @generated */ public void setFunction(String newFunction) { String oldFunction = function; function = newFunction; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, DomPackage.FUNCTION_CALL__FUNCTION, oldFunction, function)); } /** * * * @generated */ public EList getArguments() { if (arguments == null) { arguments = new EObjectContainmentEList(Expression.class, this, DomPackage.FUNCTION_CALL__ARGUMENTS); } return arguments; } /** * * * @generated */ @Override public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { switch (featureID) { case DomPackage.FUNCTION_CALL__ARGUMENTS: return ((InternalEList)getArguments()).basicRemove(otherEnd, msgs); } return super.eInverseRemove(otherEnd, featureID, msgs); } /** * * * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case DomPackage.FUNCTION_CALL__FUNCTION: return getFunction(); case DomPackage.FUNCTION_CALL__ARGUMENTS: return getArguments(); } return super.eGet(featureID, resolve, coreType); } /** * * * @generated */ @SuppressWarnings("unchecked") @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case DomPackage.FUNCTION_CALL__FUNCTION: setFunction((String)newValue); return; case DomPackage.FUNCTION_CALL__ARGUMENTS: getArguments().clear(); getArguments().addAll((Collection)newValue); return; } super.eSet(featureID, newValue); } /** * * * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case DomPackage.FUNCTION_CALL__FUNCTION: setFunction(FUNCTION_EDEFAULT); return; case DomPackage.FUNCTION_CALL__ARGUMENTS: getArguments().clear(); return; } super.eUnset(featureID); } /** * * * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case DomPackage.FUNCTION_CALL__FUNCTION: return FUNCTION_EDEFAULT == null ? function != null : !FUNCTION_EDEFAULT.equals(function); case DomPackage.FUNCTION_CALL__ARGUMENTS: return arguments != null && !arguments.isEmpty(); } return super.eIsSet(featureID); } /** * * * @generated */ @Override public String toString() { if (eIsProxy()) return super.toString(); StringBuffer result = new StringBuffer(super.toString()); result.append(" (function: "); result.append(function); result.append(')'); return result.toString(); } } //FunctionCallImpl




© 2015 - 2024 Weber Informatics LLC | Privacy Policy