org.contextmapper.tactic.dsl.tacticdsl.impl.ServiceDependencyImpl Maven / Gradle / Ivy
/**
* generated by Xtext 2.20.0
*/
package org.contextmapper.tactic.dsl.tacticdsl.impl;
import org.contextmapper.tactic.dsl.tacticdsl.Service;
import org.contextmapper.tactic.dsl.tacticdsl.ServiceDependency;
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 'Service Dependency'.
*
*
* The following features are implemented:
*
*
* - {@link org.contextmapper.tactic.dsl.tacticdsl.impl.ServiceDependencyImpl#getDependency Dependency}
*
*
* @generated
*/
public class ServiceDependencyImpl extends MinimalEObjectImpl.Container implements ServiceDependency
{
/**
* The cached value of the '{@link #getDependency() Dependency}' reference.
*
*
* @see #getDependency()
* @generated
* @ordered
*/
protected Service dependency;
/**
*
*
* @generated
*/
protected ServiceDependencyImpl()
{
super();
}
/**
*
*
* @generated
*/
@Override
protected EClass eStaticClass()
{
return TacticdslPackage.Literals.SERVICE_DEPENDENCY;
}
/**
*
*
* @generated
*/
public Service getDependency()
{
if (dependency != null && dependency.eIsProxy())
{
InternalEObject oldDependency = (InternalEObject)dependency;
dependency = (Service)eResolveProxy(oldDependency);
if (dependency != oldDependency)
{
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.RESOLVE, TacticdslPackage.SERVICE_DEPENDENCY__DEPENDENCY, oldDependency, dependency));
}
}
return dependency;
}
/**
*
*
* @generated
*/
public Service basicGetDependency()
{
return dependency;
}
/**
*
*
* @generated
*/
public void setDependency(Service newDependency)
{
Service oldDependency = dependency;
dependency = newDependency;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, TacticdslPackage.SERVICE_DEPENDENCY__DEPENDENCY, oldDependency, dependency));
}
/**
*
*
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType)
{
switch (featureID)
{
case TacticdslPackage.SERVICE_DEPENDENCY__DEPENDENCY:
if (resolve) return getDependency();
return basicGetDependency();
}
return super.eGet(featureID, resolve, coreType);
}
/**
*
*
* @generated
*/
@Override
public void eSet(int featureID, Object newValue)
{
switch (featureID)
{
case TacticdslPackage.SERVICE_DEPENDENCY__DEPENDENCY:
setDependency((Service)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
*
*
* @generated
*/
@Override
public void eUnset(int featureID)
{
switch (featureID)
{
case TacticdslPackage.SERVICE_DEPENDENCY__DEPENDENCY:
setDependency((Service)null);
return;
}
super.eUnset(featureID);
}
/**
*
*
* @generated
*/
@Override
public boolean eIsSet(int featureID)
{
switch (featureID)
{
case TacticdslPackage.SERVICE_DEPENDENCY__DEPENDENCY:
return dependency != null;
}
return super.eIsSet(featureID);
}
} //ServiceDependencyImpl