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

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

/**
 * generated by Xtext 2.21.0
 */
package org.contextmapper.tactic.dsl.tacticdsl.impl;

import org.contextmapper.tactic.dsl.tacticdsl.EnumAttribute;
import org.contextmapper.tactic.dsl.tacticdsl.TacticdslPackage;

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

import org.eclipse.emf.ecore.EClass;

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

/**
 * 
 * An implementation of the model object 'Enum Attribute'.
 * 
 * 

* The following features are implemented: *

*
    *
  • {@link org.contextmapper.tactic.dsl.tacticdsl.impl.EnumAttributeImpl#getDoc Doc}
  • *
  • {@link org.contextmapper.tactic.dsl.tacticdsl.impl.EnumAttributeImpl#getType Type}
  • *
  • {@link org.contextmapper.tactic.dsl.tacticdsl.impl.EnumAttributeImpl#getName Name}
  • *
  • {@link org.contextmapper.tactic.dsl.tacticdsl.impl.EnumAttributeImpl#isKey Key}
  • *
* * @generated */ public class EnumAttributeImpl extends MinimalEObjectImpl.Container implements EnumAttribute { /** * 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 default value of the '{@link #getType() Type}' attribute. * * * @see #getType() * @generated * @ordered */ protected static final String TYPE_EDEFAULT = null; /** * The cached value of the '{@link #getType() Type}' attribute. * * * @see #getType() * @generated * @ordered */ protected String type = TYPE_EDEFAULT; /** * 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; /** * The default value of the '{@link #isKey() Key}' attribute. * * * @see #isKey() * @generated * @ordered */ protected static final boolean KEY_EDEFAULT = false; /** * The cached value of the '{@link #isKey() Key}' attribute. * * * @see #isKey() * @generated * @ordered */ protected boolean key = KEY_EDEFAULT; /** * * * @generated */ protected EnumAttributeImpl() { super(); } /** * * * @generated */ @Override protected EClass eStaticClass() { return TacticdslPackage.Literals.ENUM_ATTRIBUTE; } /** * * * @generated */ @Override public String getDoc() { return doc; } /** * * * @generated */ @Override public void setDoc(String newDoc) { String oldDoc = doc; doc = newDoc; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, TacticdslPackage.ENUM_ATTRIBUTE__DOC, oldDoc, doc)); } /** * * * @generated */ @Override public String getType() { return type; } /** * * * @generated */ @Override public void setType(String newType) { String oldType = type; type = newType; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, TacticdslPackage.ENUM_ATTRIBUTE__TYPE, oldType, type)); } /** * * * @generated */ @Override public String getName() { return name; } /** * * * @generated */ @Override public void setName(String newName) { String oldName = name; name = newName; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, TacticdslPackage.ENUM_ATTRIBUTE__NAME, oldName, name)); } /** * * * @generated */ @Override public boolean isKey() { return key; } /** * * * @generated */ @Override public void setKey(boolean newKey) { boolean oldKey = key; key = newKey; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, TacticdslPackage.ENUM_ATTRIBUTE__KEY, oldKey, key)); } /** * * * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case TacticdslPackage.ENUM_ATTRIBUTE__DOC: return getDoc(); case TacticdslPackage.ENUM_ATTRIBUTE__TYPE: return getType(); case TacticdslPackage.ENUM_ATTRIBUTE__NAME: return getName(); case TacticdslPackage.ENUM_ATTRIBUTE__KEY: return isKey(); } return super.eGet(featureID, resolve, coreType); } /** * * * @generated */ @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case TacticdslPackage.ENUM_ATTRIBUTE__DOC: setDoc((String)newValue); return; case TacticdslPackage.ENUM_ATTRIBUTE__TYPE: setType((String)newValue); return; case TacticdslPackage.ENUM_ATTRIBUTE__NAME: setName((String)newValue); return; case TacticdslPackage.ENUM_ATTRIBUTE__KEY: setKey((Boolean)newValue); return; } super.eSet(featureID, newValue); } /** * * * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case TacticdslPackage.ENUM_ATTRIBUTE__DOC: setDoc(DOC_EDEFAULT); return; case TacticdslPackage.ENUM_ATTRIBUTE__TYPE: setType(TYPE_EDEFAULT); return; case TacticdslPackage.ENUM_ATTRIBUTE__NAME: setName(NAME_EDEFAULT); return; case TacticdslPackage.ENUM_ATTRIBUTE__KEY: setKey(KEY_EDEFAULT); return; } super.eUnset(featureID); } /** * * * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case TacticdslPackage.ENUM_ATTRIBUTE__DOC: return DOC_EDEFAULT == null ? doc != null : !DOC_EDEFAULT.equals(doc); case TacticdslPackage.ENUM_ATTRIBUTE__TYPE: return TYPE_EDEFAULT == null ? type != null : !TYPE_EDEFAULT.equals(type); case TacticdslPackage.ENUM_ATTRIBUTE__NAME: return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); case TacticdslPackage.ENUM_ATTRIBUTE__KEY: return key != KEY_EDEFAULT; } return super.eIsSet(featureID); } /** * * * @generated */ @Override public String toString() { if (eIsProxy()) return super.toString(); StringBuilder result = new StringBuilder(super.toString()); result.append(" (doc: "); result.append(doc); result.append(", type: "); result.append(type); result.append(", name: "); result.append(name); result.append(", key: "); result.append(key); result.append(')'); return result.toString(); } } //EnumAttributeImpl




© 2015 - 2024 Weber Informatics LLC | Privacy Policy