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

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

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

import org.contextmapper.tactic.dsl.tacticdsl.Subscribe;
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 'Subscribe'.
 * 
 * 

* The following features are implemented: *

*
    *
  • {@link org.contextmapper.tactic.dsl.tacticdsl.impl.SubscribeImpl#getTopic Topic}
  • *
  • {@link org.contextmapper.tactic.dsl.tacticdsl.impl.SubscribeImpl#getEventBus Event Bus}
  • *
* * @generated */ public class SubscribeImpl extends MinimalEObjectImpl.Container implements Subscribe { /** * The default value of the '{@link #getTopic() Topic}' attribute. * * * @see #getTopic() * @generated * @ordered */ protected static final String TOPIC_EDEFAULT = null; /** * The cached value of the '{@link #getTopic() Topic}' attribute. * * * @see #getTopic() * @generated * @ordered */ protected String topic = TOPIC_EDEFAULT; /** * The default value of the '{@link #getEventBus() Event Bus}' attribute. * * * @see #getEventBus() * @generated * @ordered */ protected static final String EVENT_BUS_EDEFAULT = null; /** * The cached value of the '{@link #getEventBus() Event Bus}' attribute. * * * @see #getEventBus() * @generated * @ordered */ protected String eventBus = EVENT_BUS_EDEFAULT; /** * * * @generated */ protected SubscribeImpl() { super(); } /** * * * @generated */ @Override protected EClass eStaticClass() { return TacticdslPackage.Literals.SUBSCRIBE; } /** * * * @generated */ public String getTopic() { return topic; } /** * * * @generated */ public void setTopic(String newTopic) { String oldTopic = topic; topic = newTopic; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, TacticdslPackage.SUBSCRIBE__TOPIC, oldTopic, topic)); } /** * * * @generated */ public String getEventBus() { return eventBus; } /** * * * @generated */ public void setEventBus(String newEventBus) { String oldEventBus = eventBus; eventBus = newEventBus; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, TacticdslPackage.SUBSCRIBE__EVENT_BUS, oldEventBus, eventBus)); } /** * * * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case TacticdslPackage.SUBSCRIBE__TOPIC: return getTopic(); case TacticdslPackage.SUBSCRIBE__EVENT_BUS: return getEventBus(); } return super.eGet(featureID, resolve, coreType); } /** * * * @generated */ @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case TacticdslPackage.SUBSCRIBE__TOPIC: setTopic((String)newValue); return; case TacticdslPackage.SUBSCRIBE__EVENT_BUS: setEventBus((String)newValue); return; } super.eSet(featureID, newValue); } /** * * * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case TacticdslPackage.SUBSCRIBE__TOPIC: setTopic(TOPIC_EDEFAULT); return; case TacticdslPackage.SUBSCRIBE__EVENT_BUS: setEventBus(EVENT_BUS_EDEFAULT); return; } super.eUnset(featureID); } /** * * * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case TacticdslPackage.SUBSCRIBE__TOPIC: return TOPIC_EDEFAULT == null ? topic != null : !TOPIC_EDEFAULT.equals(topic); case TacticdslPackage.SUBSCRIBE__EVENT_BUS: return EVENT_BUS_EDEFAULT == null ? eventBus != null : !EVENT_BUS_EDEFAULT.equals(eventBus); } return super.eIsSet(featureID); } /** * * * @generated */ @Override public String toString() { if (eIsProxy()) return super.toString(); StringBuffer result = new StringBuffer(super.toString()); result.append(" (topic: "); result.append(topic); result.append(", eventBus: "); result.append(eventBus); result.append(')'); return result.toString(); } } //SubscribeImpl




© 2015 - 2024 Weber Informatics LLC | Privacy Policy