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

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

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

import java.util.Collection;

import org.contextmapper.tactic.dsl.tacticdsl.ComplexType;
import org.contextmapper.tactic.dsl.tacticdsl.Parameter;
import org.contextmapper.tactic.dsl.tacticdsl.Publish;
import org.contextmapper.tactic.dsl.tacticdsl.ServiceOperation;
import org.contextmapper.tactic.dsl.tacticdsl.ServiceOperationDelegate;
import org.contextmapper.tactic.dsl.tacticdsl.TacticdslPackage;
import org.contextmapper.tactic.dsl.tacticdsl.Visibility;

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;

/**
 * 
 * An implementation of the model object 'Service Operation'.
 * 
 * 

* The following features are implemented: *

*
    *
  • {@link org.contextmapper.tactic.dsl.tacticdsl.impl.ServiceOperationImpl#getDoc Doc}
  • *
  • {@link org.contextmapper.tactic.dsl.tacticdsl.impl.ServiceOperationImpl#getVisibility Visibility}
  • *
  • {@link org.contextmapper.tactic.dsl.tacticdsl.impl.ServiceOperationImpl#getReturnType Return Type}
  • *
  • {@link org.contextmapper.tactic.dsl.tacticdsl.impl.ServiceOperationImpl#getName Name}
  • *
  • {@link org.contextmapper.tactic.dsl.tacticdsl.impl.ServiceOperationImpl#getParameters Parameters}
  • *
  • {@link org.contextmapper.tactic.dsl.tacticdsl.impl.ServiceOperationImpl#getThrows Throws}
  • *
  • {@link org.contextmapper.tactic.dsl.tacticdsl.impl.ServiceOperationImpl#getHint Hint}
  • *
  • {@link org.contextmapper.tactic.dsl.tacticdsl.impl.ServiceOperationImpl#getPublish Publish}
  • *
  • {@link org.contextmapper.tactic.dsl.tacticdsl.impl.ServiceOperationImpl#getDelegateHolder Delegate Holder}
  • *
* * @generated */ public class ServiceOperationImpl extends DomainObjectTypedElementImpl implements ServiceOperation { /** * 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 #getVisibility() Visibility}' attribute. * * * @see #getVisibility() * @generated * @ordered */ protected static final Visibility VISIBILITY_EDEFAULT = Visibility.PUBLIC; /** * The cached value of the '{@link #getVisibility() Visibility}' attribute. * * * @see #getVisibility() * @generated * @ordered */ protected Visibility visibility = VISIBILITY_EDEFAULT; /** * The cached value of the '{@link #getReturnType() Return Type}' containment reference. * * * @see #getReturnType() * @generated * @ordered */ protected ComplexType returnType; /** * 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 cached value of the '{@link #getParameters() Parameters}' containment reference list. * * * @see #getParameters() * @generated * @ordered */ protected EList parameters; /** * The default value of the '{@link #getThrows() Throws}' attribute. * * * @see #getThrows() * @generated * @ordered */ protected static final String THROWS_EDEFAULT = null; /** * The cached value of the '{@link #getThrows() Throws}' attribute. * * * @see #getThrows() * @generated * @ordered */ protected String throws_ = THROWS_EDEFAULT; /** * The default value of the '{@link #getHint() Hint}' attribute. * * * @see #getHint() * @generated * @ordered */ protected static final String HINT_EDEFAULT = null; /** * The cached value of the '{@link #getHint() Hint}' attribute. * * * @see #getHint() * @generated * @ordered */ protected String hint = HINT_EDEFAULT; /** * The cached value of the '{@link #getPublish() Publish}' containment reference. * * * @see #getPublish() * @generated * @ordered */ protected Publish publish; /** * The cached value of the '{@link #getDelegateHolder() Delegate Holder}' containment reference. * * * @see #getDelegateHolder() * @generated * @ordered */ protected ServiceOperationDelegate delegateHolder; /** * * * @generated */ protected ServiceOperationImpl() { super(); } /** * * * @generated */ @Override protected EClass eStaticClass() { return TacticdslPackage.Literals.SERVICE_OPERATION; } /** * * * @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.SERVICE_OPERATION__DOC, oldDoc, doc)); } /** * * * @generated */ public Visibility getVisibility() { return visibility; } /** * * * @generated */ public void setVisibility(Visibility newVisibility) { Visibility oldVisibility = visibility; visibility = newVisibility == null ? VISIBILITY_EDEFAULT : newVisibility; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, TacticdslPackage.SERVICE_OPERATION__VISIBILITY, oldVisibility, visibility)); } /** * * * @generated */ public ComplexType getReturnType() { return returnType; } /** * * * @generated */ public NotificationChain basicSetReturnType(ComplexType newReturnType, NotificationChain msgs) { ComplexType oldReturnType = returnType; returnType = newReturnType; if (eNotificationRequired()) { ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, TacticdslPackage.SERVICE_OPERATION__RETURN_TYPE, oldReturnType, newReturnType); if (msgs == null) msgs = notification; else msgs.add(notification); } return msgs; } /** * * * @generated */ public void setReturnType(ComplexType newReturnType) { if (newReturnType != returnType) { NotificationChain msgs = null; if (returnType != null) msgs = ((InternalEObject)returnType).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - TacticdslPackage.SERVICE_OPERATION__RETURN_TYPE, null, msgs); if (newReturnType != null) msgs = ((InternalEObject)newReturnType).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - TacticdslPackage.SERVICE_OPERATION__RETURN_TYPE, null, msgs); msgs = basicSetReturnType(newReturnType, msgs); if (msgs != null) msgs.dispatch(); } else if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, TacticdslPackage.SERVICE_OPERATION__RETURN_TYPE, newReturnType, newReturnType)); } /** * * * @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.SERVICE_OPERATION__NAME, oldName, name)); } /** * * * @generated */ public EList getParameters() { if (parameters == null) { parameters = new EObjectContainmentEList(Parameter.class, this, TacticdslPackage.SERVICE_OPERATION__PARAMETERS); } return parameters; } /** * * * @generated */ public String getThrows() { return throws_; } /** * * * @generated */ public void setThrows(String newThrows) { String oldThrows = throws_; throws_ = newThrows; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, TacticdslPackage.SERVICE_OPERATION__THROWS, oldThrows, throws_)); } /** * * * @generated */ public String getHint() { return hint; } /** * * * @generated */ public void setHint(String newHint) { String oldHint = hint; hint = newHint; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, TacticdslPackage.SERVICE_OPERATION__HINT, oldHint, hint)); } /** * * * @generated */ public Publish getPublish() { return publish; } /** * * * @generated */ public NotificationChain basicSetPublish(Publish newPublish, NotificationChain msgs) { Publish oldPublish = publish; publish = newPublish; if (eNotificationRequired()) { ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, TacticdslPackage.SERVICE_OPERATION__PUBLISH, oldPublish, newPublish); if (msgs == null) msgs = notification; else msgs.add(notification); } return msgs; } /** * * * @generated */ public void setPublish(Publish newPublish) { if (newPublish != publish) { NotificationChain msgs = null; if (publish != null) msgs = ((InternalEObject)publish).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - TacticdslPackage.SERVICE_OPERATION__PUBLISH, null, msgs); if (newPublish != null) msgs = ((InternalEObject)newPublish).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - TacticdslPackage.SERVICE_OPERATION__PUBLISH, null, msgs); msgs = basicSetPublish(newPublish, msgs); if (msgs != null) msgs.dispatch(); } else if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, TacticdslPackage.SERVICE_OPERATION__PUBLISH, newPublish, newPublish)); } /** * * * @generated */ public ServiceOperationDelegate getDelegateHolder() { return delegateHolder; } /** * * * @generated */ public NotificationChain basicSetDelegateHolder(ServiceOperationDelegate newDelegateHolder, NotificationChain msgs) { ServiceOperationDelegate oldDelegateHolder = delegateHolder; delegateHolder = newDelegateHolder; if (eNotificationRequired()) { ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, TacticdslPackage.SERVICE_OPERATION__DELEGATE_HOLDER, oldDelegateHolder, newDelegateHolder); if (msgs == null) msgs = notification; else msgs.add(notification); } return msgs; } /** * * * @generated */ public void setDelegateHolder(ServiceOperationDelegate newDelegateHolder) { if (newDelegateHolder != delegateHolder) { NotificationChain msgs = null; if (delegateHolder != null) msgs = ((InternalEObject)delegateHolder).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - TacticdslPackage.SERVICE_OPERATION__DELEGATE_HOLDER, null, msgs); if (newDelegateHolder != null) msgs = ((InternalEObject)newDelegateHolder).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - TacticdslPackage.SERVICE_OPERATION__DELEGATE_HOLDER, null, msgs); msgs = basicSetDelegateHolder(newDelegateHolder, msgs); if (msgs != null) msgs.dispatch(); } else if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, TacticdslPackage.SERVICE_OPERATION__DELEGATE_HOLDER, newDelegateHolder, newDelegateHolder)); } /** * * * @generated */ @Override public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { switch (featureID) { case TacticdslPackage.SERVICE_OPERATION__RETURN_TYPE: return basicSetReturnType(null, msgs); case TacticdslPackage.SERVICE_OPERATION__PARAMETERS: return ((InternalEList)getParameters()).basicRemove(otherEnd, msgs); case TacticdslPackage.SERVICE_OPERATION__PUBLISH: return basicSetPublish(null, msgs); case TacticdslPackage.SERVICE_OPERATION__DELEGATE_HOLDER: return basicSetDelegateHolder(null, msgs); } return super.eInverseRemove(otherEnd, featureID, msgs); } /** * * * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case TacticdslPackage.SERVICE_OPERATION__DOC: return getDoc(); case TacticdslPackage.SERVICE_OPERATION__VISIBILITY: return getVisibility(); case TacticdslPackage.SERVICE_OPERATION__RETURN_TYPE: return getReturnType(); case TacticdslPackage.SERVICE_OPERATION__NAME: return getName(); case TacticdslPackage.SERVICE_OPERATION__PARAMETERS: return getParameters(); case TacticdslPackage.SERVICE_OPERATION__THROWS: return getThrows(); case TacticdslPackage.SERVICE_OPERATION__HINT: return getHint(); case TacticdslPackage.SERVICE_OPERATION__PUBLISH: return getPublish(); case TacticdslPackage.SERVICE_OPERATION__DELEGATE_HOLDER: return getDelegateHolder(); } return super.eGet(featureID, resolve, coreType); } /** * * * @generated */ @SuppressWarnings("unchecked") @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case TacticdslPackage.SERVICE_OPERATION__DOC: setDoc((String)newValue); return; case TacticdslPackage.SERVICE_OPERATION__VISIBILITY: setVisibility((Visibility)newValue); return; case TacticdslPackage.SERVICE_OPERATION__RETURN_TYPE: setReturnType((ComplexType)newValue); return; case TacticdslPackage.SERVICE_OPERATION__NAME: setName((String)newValue); return; case TacticdslPackage.SERVICE_OPERATION__PARAMETERS: getParameters().clear(); getParameters().addAll((Collection)newValue); return; case TacticdslPackage.SERVICE_OPERATION__THROWS: setThrows((String)newValue); return; case TacticdslPackage.SERVICE_OPERATION__HINT: setHint((String)newValue); return; case TacticdslPackage.SERVICE_OPERATION__PUBLISH: setPublish((Publish)newValue); return; case TacticdslPackage.SERVICE_OPERATION__DELEGATE_HOLDER: setDelegateHolder((ServiceOperationDelegate)newValue); return; } super.eSet(featureID, newValue); } /** * * * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case TacticdslPackage.SERVICE_OPERATION__DOC: setDoc(DOC_EDEFAULT); return; case TacticdslPackage.SERVICE_OPERATION__VISIBILITY: setVisibility(VISIBILITY_EDEFAULT); return; case TacticdslPackage.SERVICE_OPERATION__RETURN_TYPE: setReturnType((ComplexType)null); return; case TacticdslPackage.SERVICE_OPERATION__NAME: setName(NAME_EDEFAULT); return; case TacticdslPackage.SERVICE_OPERATION__PARAMETERS: getParameters().clear(); return; case TacticdslPackage.SERVICE_OPERATION__THROWS: setThrows(THROWS_EDEFAULT); return; case TacticdslPackage.SERVICE_OPERATION__HINT: setHint(HINT_EDEFAULT); return; case TacticdslPackage.SERVICE_OPERATION__PUBLISH: setPublish((Publish)null); return; case TacticdslPackage.SERVICE_OPERATION__DELEGATE_HOLDER: setDelegateHolder((ServiceOperationDelegate)null); return; } super.eUnset(featureID); } /** * * * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case TacticdslPackage.SERVICE_OPERATION__DOC: return DOC_EDEFAULT == null ? doc != null : !DOC_EDEFAULT.equals(doc); case TacticdslPackage.SERVICE_OPERATION__VISIBILITY: return visibility != VISIBILITY_EDEFAULT; case TacticdslPackage.SERVICE_OPERATION__RETURN_TYPE: return returnType != null; case TacticdslPackage.SERVICE_OPERATION__NAME: return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); case TacticdslPackage.SERVICE_OPERATION__PARAMETERS: return parameters != null && !parameters.isEmpty(); case TacticdslPackage.SERVICE_OPERATION__THROWS: return THROWS_EDEFAULT == null ? throws_ != null : !THROWS_EDEFAULT.equals(throws_); case TacticdslPackage.SERVICE_OPERATION__HINT: return HINT_EDEFAULT == null ? hint != null : !HINT_EDEFAULT.equals(hint); case TacticdslPackage.SERVICE_OPERATION__PUBLISH: return publish != null; case TacticdslPackage.SERVICE_OPERATION__DELEGATE_HOLDER: return delegateHolder != null; } 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(", visibility: "); result.append(visibility); result.append(", name: "); result.append(name); result.append(", throws: "); result.append(throws_); result.append(", hint: "); result.append(hint); result.append(')'); return result.toString(); } } //ServiceOperationImpl




© 2015 - 2024 Weber Informatics LLC | Privacy Policy