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

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

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

import org.contextmapper.tactic.dsl.tacticdsl.Dependency;
import org.contextmapper.tactic.dsl.tacticdsl.ServiceRepositoryOption;
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.InternalEObject;

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

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

* The following features are implemented: *

*
    *
  • {@link org.contextmapper.tactic.dsl.tacticdsl.impl.DependencyImpl#getDependency Dependency}
  • *
  • {@link org.contextmapper.tactic.dsl.tacticdsl.impl.DependencyImpl#getName Name}
  • *
* * @generated */ public class DependencyImpl extends MinimalEObjectImpl.Container implements Dependency { /** * The cached value of the '{@link #getDependency() Dependency}' reference. * * * @see #getDependency() * @generated * @ordered */ protected ServiceRepositoryOption dependency; /** * 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 DependencyImpl() { super(); } /** * * * @generated */ @Override protected EClass eStaticClass() { return TacticdslPackage.Literals.DEPENDENCY; } /** * * * @generated */ @Override public ServiceRepositoryOption getDependency() { if (dependency != null && dependency.eIsProxy()) { InternalEObject oldDependency = (InternalEObject)dependency; dependency = (ServiceRepositoryOption)eResolveProxy(oldDependency); if (dependency != oldDependency) { if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.RESOLVE, TacticdslPackage.DEPENDENCY__DEPENDENCY, oldDependency, dependency)); } } return dependency; } /** * * * @generated */ public ServiceRepositoryOption basicGetDependency() { return dependency; } /** * * * @generated */ @Override public void setDependency(ServiceRepositoryOption newDependency) { ServiceRepositoryOption oldDependency = dependency; dependency = newDependency; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, TacticdslPackage.DEPENDENCY__DEPENDENCY, oldDependency, dependency)); } /** * * * @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.DEPENDENCY__NAME, oldName, name)); } /** * * * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case TacticdslPackage.DEPENDENCY__DEPENDENCY: if (resolve) return getDependency(); return basicGetDependency(); case TacticdslPackage.DEPENDENCY__NAME: return getName(); } return super.eGet(featureID, resolve, coreType); } /** * * * @generated */ @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case TacticdslPackage.DEPENDENCY__DEPENDENCY: setDependency((ServiceRepositoryOption)newValue); return; case TacticdslPackage.DEPENDENCY__NAME: setName((String)newValue); return; } super.eSet(featureID, newValue); } /** * * * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case TacticdslPackage.DEPENDENCY__DEPENDENCY: setDependency((ServiceRepositoryOption)null); return; case TacticdslPackage.DEPENDENCY__NAME: setName(NAME_EDEFAULT); return; } super.eUnset(featureID); } /** * * * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case TacticdslPackage.DEPENDENCY__DEPENDENCY: return dependency != null; case TacticdslPackage.DEPENDENCY__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(); StringBuilder result = new StringBuilder(super.toString()); result.append(" (name: "); result.append(name); result.append(')'); return result.toString(); } } //DependencyImpl




© 2015 - 2024 Weber Informatics LLC | Privacy Policy