/** | |
* Copyright (c) 2009-2010 Thales Corporate Services S.A.S. | |
* 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: | |
* Thales Corporate Services S.A.S - initial API and implementation | |
*/ | |
package org.eclipse.egf.model.pattern.impl; | |
import org.eclipse.egf.model.pattern.InjectedContext; | |
import org.eclipse.egf.model.pattern.PatternCall; | |
import org.eclipse.egf.model.pattern.PatternPackage; | |
import org.eclipse.egf.model.pattern.PatternParameter; | |
import org.eclipse.emf.common.notify.NotificationChain; | |
import org.eclipse.emf.common.util.EMap; | |
import org.eclipse.emf.ecore.EClass; | |
import org.eclipse.emf.ecore.EStructuralFeature; | |
import org.eclipse.emf.ecore.InternalEObject; | |
import org.eclipse.emf.ecore.util.EcoreEMap; | |
import org.eclipse.emf.ecore.util.InternalEList; | |
/** | |
* <!-- begin-user-doc --> | |
* An implementation of the model object '<em><b>Call</b></em>'. | |
* <!-- end-user-doc --> | |
* <p> | |
* The following features are implemented: | |
* <ul> | |
* <li>{@link org.eclipse.egf.model.pattern.impl.PatternCallImpl#getParameterMatching <em>Parameter Matching</em>}</li> | |
* </ul> | |
* </p> | |
* | |
* @generated | |
*/ | |
public class PatternCallImpl extends AbstractPatternCallImpl implements PatternCall { | |
/** | |
* The cached value of the '{@link #getParameterMatching() <em>Parameter Matching</em>}' map. | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @see #getParameterMatching() | |
* @generated | |
* @ordered | |
*/ | |
protected EMap<InjectedContext, InjectedContext> parameterMatching; | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
protected PatternCallImpl() { | |
super(); | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
@Override | |
protected EClass eStaticClass() { | |
return PatternPackage.Literals.PATTERN_CALL; | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
public EMap<InjectedContext, InjectedContext> getParameterMatching() { | |
if (parameterMatching == null) { | |
parameterMatching = new EcoreEMap<InjectedContext, InjectedContext>(PatternPackage.Literals.PARAMERTER2_PARAMETER_MAP, Paramerter2ParameterMapImpl.class, this, PatternPackage.PATTERN_CALL__PARAMETER_MATCHING); | |
} | |
return parameterMatching; | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
@Override | |
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { | |
switch (featureID) { | |
case PatternPackage.PATTERN_CALL__PARAMETER_MATCHING: | |
return ((InternalEList<?>) getParameterMatching()).basicRemove(otherEnd, msgs); | |
} | |
return super.eInverseRemove(otherEnd, featureID, msgs); | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
@Override | |
@SuppressWarnings("all") | |
public Object eGet(int featureID, boolean resolve, boolean coreType) { | |
switch (featureID) { | |
case PatternPackage.PATTERN_CALL__PARAMETER_MATCHING: | |
if (coreType) | |
return getParameterMatching(); | |
else | |
return getParameterMatching().map(); | |
} | |
return super.eGet(featureID, resolve, coreType); | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
@Override | |
public void eSet(int featureID, Object newValue) { | |
switch (featureID) { | |
case PatternPackage.PATTERN_CALL__PARAMETER_MATCHING: | |
((EStructuralFeature.Setting) getParameterMatching()).set(newValue); | |
return; | |
} | |
super.eSet(featureID, newValue); | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
@Override | |
public void eUnset(int featureID) { | |
switch (featureID) { | |
case PatternPackage.PATTERN_CALL__PARAMETER_MATCHING: | |
getParameterMatching().clear(); | |
return; | |
} | |
super.eUnset(featureID); | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
@Override | |
public boolean eIsSet(int featureID) { | |
switch (featureID) { | |
case PatternPackage.PATTERN_CALL__PARAMETER_MATCHING: | |
return parameterMatching != null && !parameterMatching.isEmpty(); | |
} | |
return super.eIsSet(featureID); | |
} | |
} // PatternCallImpl |