/**
*/
package de.gebit.integrity.dsl.impl;
import de.gebit.integrity.dsl.DslPackage;
import de.gebit.integrity.dsl.VariableEntity;
import de.gebit.integrity.dsl.VariableVariable;
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;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Variable Variable</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* </p>
* <ul>
* <li>{@link de.gebit.integrity.dsl.impl.VariableVariableImpl#getName <em>Name</em>}</li>
* </ul>
*
* @generated
*/
public class VariableVariableImpl extends MinimalEObjectImpl.Container implements VariableVariable
{
/**
* The cached value of the '{@link #getName() <em>Name</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getName()
* @generated
* @ordered
*/
protected VariableEntity name;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected VariableVariableImpl()
{
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass()
{
return DslPackage.Literals.VARIABLE_VARIABLE;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public VariableEntity getName()
{
if (name != null && name.eIsProxy())
{
InternalEObject oldName = (InternalEObject)name;
name = (VariableEntity)eResolveProxy(oldName);
if (name != oldName)
{
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.RESOLVE, DslPackage.VARIABLE_VARIABLE__NAME, oldName, name));
}
}
return name;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public VariableEntity basicGetName()
{
return name;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setName(VariableEntity newName)
{
VariableEntity oldName = name;
name = newName;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, DslPackage.VARIABLE_VARIABLE__NAME, oldName, name));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType)
{
switch (featureID)
{
case DslPackage.VARIABLE_VARIABLE__NAME:
if (resolve) return getName();
return basicGetName();
}
return super.eGet(featureID, resolve, coreType);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eSet(int featureID, Object newValue)
{
switch (featureID)
{
case DslPackage.VARIABLE_VARIABLE__NAME:
setName((VariableEntity)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID)
{
switch (featureID)
{
case DslPackage.VARIABLE_VARIABLE__NAME:
setName((VariableEntity)null);
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID)
{
switch (featureID)
{
case DslPackage.VARIABLE_VARIABLE__NAME:
return name != null;
}
return super.eIsSet(featureID);
}
} //VariableVariableImpl