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

org.contextmapper.tactic.dsl.tacticdsl.impl.ParameterImpl Maven / Gradle / Ivy

There is a newer version: 6.12.0
Show newest version
/**
 * generated by Xtext 2.20.0
 */
package org.contextmapper.tactic.dsl.tacticdsl.impl;

import org.contextmapper.tactic.dsl.tacticdsl.ComplexType;
import org.contextmapper.tactic.dsl.tacticdsl.Parameter;
import org.contextmapper.tactic.dsl.tacticdsl.TacticdslPackage;

import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.notify.NotificationChain;

import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.InternalEObject;

import org.eclipse.emf.ecore.impl.ENotificationImpl;

/**
 * 
 * An implementation of the model object 'Parameter'.
 * 
 * 

* The following features are implemented: *

*
    *
  • {@link org.contextmapper.tactic.dsl.tacticdsl.impl.ParameterImpl#getDoc Doc}
  • *
  • {@link org.contextmapper.tactic.dsl.tacticdsl.impl.ParameterImpl#getParameterType Parameter Type}
  • *
  • {@link org.contextmapper.tactic.dsl.tacticdsl.impl.ParameterImpl#getName Name}
  • *
* * @generated */ public class ParameterImpl extends DomainObjectTypedElementImpl implements Parameter { /** * The default value of the '{@link #getDoc() Doc}' attribute. * * * @see #getDoc() * @generated * @ordered */ protected static final String DOC_EDEFAULT = null; /** * The cached value of the '{@link #getDoc() Doc}' attribute. * * * @see #getDoc() * @generated * @ordered */ protected String doc = DOC_EDEFAULT; /** * The cached value of the '{@link #getParameterType() Parameter Type}' containment reference. * * * @see #getParameterType() * @generated * @ordered */ protected ComplexType parameterType; /** * The default value of the '{@link #getName() Name}' attribute. * * * @see #getName() * @generated * @ordered */ protected static final String NAME_EDEFAULT = null; /** * The cached value of the '{@link #getName() Name}' attribute. * * * @see #getName() * @generated * @ordered */ protected String name = NAME_EDEFAULT; /** * * * @generated */ protected ParameterImpl() { super(); } /** * * * @generated */ @Override protected EClass eStaticClass() { return TacticdslPackage.Literals.PARAMETER; } /** * * * @generated */ public String getDoc() { return doc; } /** * * * @generated */ public void setDoc(String newDoc) { String oldDoc = doc; doc = newDoc; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, TacticdslPackage.PARAMETER__DOC, oldDoc, doc)); } /** * * * @generated */ public ComplexType getParameterType() { return parameterType; } /** * * * @generated */ public NotificationChain basicSetParameterType(ComplexType newParameterType, NotificationChain msgs) { ComplexType oldParameterType = parameterType; parameterType = newParameterType; if (eNotificationRequired()) { ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, TacticdslPackage.PARAMETER__PARAMETER_TYPE, oldParameterType, newParameterType); if (msgs == null) msgs = notification; else msgs.add(notification); } return msgs; } /** * * * @generated */ public void setParameterType(ComplexType newParameterType) { if (newParameterType != parameterType) { NotificationChain msgs = null; if (parameterType != null) msgs = ((InternalEObject)parameterType).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - TacticdslPackage.PARAMETER__PARAMETER_TYPE, null, msgs); if (newParameterType != null) msgs = ((InternalEObject)newParameterType).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - TacticdslPackage.PARAMETER__PARAMETER_TYPE, null, msgs); msgs = basicSetParameterType(newParameterType, msgs); if (msgs != null) msgs.dispatch(); } else if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, TacticdslPackage.PARAMETER__PARAMETER_TYPE, newParameterType, newParameterType)); } /** * * * @generated */ public String getName() { return name; } /** * * * @generated */ public void setName(String newName) { String oldName = name; name = newName; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, TacticdslPackage.PARAMETER__NAME, oldName, name)); } /** * * * @generated */ @Override public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { switch (featureID) { case TacticdslPackage.PARAMETER__PARAMETER_TYPE: return basicSetParameterType(null, msgs); } return super.eInverseRemove(otherEnd, featureID, msgs); } /** * * * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case TacticdslPackage.PARAMETER__DOC: return getDoc(); case TacticdslPackage.PARAMETER__PARAMETER_TYPE: return getParameterType(); case TacticdslPackage.PARAMETER__NAME: return getName(); } return super.eGet(featureID, resolve, coreType); } /** * * * @generated */ @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case TacticdslPackage.PARAMETER__DOC: setDoc((String)newValue); return; case TacticdslPackage.PARAMETER__PARAMETER_TYPE: setParameterType((ComplexType)newValue); return; case TacticdslPackage.PARAMETER__NAME: setName((String)newValue); return; } super.eSet(featureID, newValue); } /** * * * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case TacticdslPackage.PARAMETER__DOC: setDoc(DOC_EDEFAULT); return; case TacticdslPackage.PARAMETER__PARAMETER_TYPE: setParameterType((ComplexType)null); return; case TacticdslPackage.PARAMETER__NAME: setName(NAME_EDEFAULT); return; } super.eUnset(featureID); } /** * * * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case TacticdslPackage.PARAMETER__DOC: return DOC_EDEFAULT == null ? doc != null : !DOC_EDEFAULT.equals(doc); case TacticdslPackage.PARAMETER__PARAMETER_TYPE: return parameterType != null; case TacticdslPackage.PARAMETER__NAME: return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); } return super.eIsSet(featureID); } /** * * * @generated */ @Override public String toString() { if (eIsProxy()) return super.toString(); StringBuffer result = new StringBuffer(super.toString()); result.append(" (doc: "); result.append(doc); result.append(", name: "); result.append(name); result.append(')'); return result.toString(); } } //ParameterImpl




© 2015 - 2025 Weber Informatics LLC | Privacy Policy