/**
*/
package hu.bme.mit.inf.dslreasoner.alloyLanguage.impl;
import hu.bme.mit.inf.dslreasoner.alloyLanguage.ALSSigScope;
import hu.bme.mit.inf.dslreasoner.alloyLanguage.ALSSignatureDeclaration;
import hu.bme.mit.inf.dslreasoner.alloyLanguage.AlloyLanguagePackage;
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;
/**
*
* An implementation of the model object 'ALS Sig Scope'.
*
*
* The following features are implemented:
*
*
* - {@link hu.bme.mit.inf.dslreasoner.alloyLanguage.impl.ALSSigScopeImpl#isExactly Exactly}
* - {@link hu.bme.mit.inf.dslreasoner.alloyLanguage.impl.ALSSigScopeImpl#getType Type}
*
*
* @generated
*/
public class ALSSigScopeImpl extends ALSTypeScopeImpl implements ALSSigScope
{
/**
* The default value of the '{@link #isExactly() Exactly}' attribute.
*
*
* @see #isExactly()
* @generated
* @ordered
*/
protected static final boolean EXACTLY_EDEFAULT = false;
/**
* The cached value of the '{@link #isExactly() Exactly}' attribute.
*
*
* @see #isExactly()
* @generated
* @ordered
*/
protected boolean exactly = EXACTLY_EDEFAULT;
/**
* The cached value of the '{@link #getType() Type}' reference.
*
*
* @see #getType()
* @generated
* @ordered
*/
protected ALSSignatureDeclaration type;
/**
*
*
* @generated
*/
protected ALSSigScopeImpl()
{
super();
}
/**
*
*
* @generated
*/
@Override
protected EClass eStaticClass()
{
return AlloyLanguagePackage.Literals.ALS_SIG_SCOPE;
}
/**
*
*
* @generated
*/
public boolean isExactly()
{
return exactly;
}
/**
*
*
* @generated
*/
public void setExactly(boolean newExactly)
{
boolean oldExactly = exactly;
exactly = newExactly;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, AlloyLanguagePackage.ALS_SIG_SCOPE__EXACTLY, oldExactly, exactly));
}
/**
*
*
* @generated
*/
public ALSSignatureDeclaration getType()
{
if (type != null && type.eIsProxy())
{
InternalEObject oldType = (InternalEObject)type;
type = (ALSSignatureDeclaration)eResolveProxy(oldType);
if (type != oldType)
{
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.RESOLVE, AlloyLanguagePackage.ALS_SIG_SCOPE__TYPE, oldType, type));
}
}
return type;
}
/**
*
*
* @generated
*/
public ALSSignatureDeclaration basicGetType()
{
return type;
}
/**
*
*
* @generated
*/
public void setType(ALSSignatureDeclaration newType)
{
ALSSignatureDeclaration oldType = type;
type = newType;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, AlloyLanguagePackage.ALS_SIG_SCOPE__TYPE, oldType, type));
}
/**
*
*
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType)
{
switch (featureID)
{
case AlloyLanguagePackage.ALS_SIG_SCOPE__EXACTLY:
return isExactly();
case AlloyLanguagePackage.ALS_SIG_SCOPE__TYPE:
if (resolve) return getType();
return basicGetType();
}
return super.eGet(featureID, resolve, coreType);
}
/**
*
*
* @generated
*/
@Override
public void eSet(int featureID, Object newValue)
{
switch (featureID)
{
case AlloyLanguagePackage.ALS_SIG_SCOPE__EXACTLY:
setExactly((Boolean)newValue);
return;
case AlloyLanguagePackage.ALS_SIG_SCOPE__TYPE:
setType((ALSSignatureDeclaration)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
*
*
* @generated
*/
@Override
public void eUnset(int featureID)
{
switch (featureID)
{
case AlloyLanguagePackage.ALS_SIG_SCOPE__EXACTLY:
setExactly(EXACTLY_EDEFAULT);
return;
case AlloyLanguagePackage.ALS_SIG_SCOPE__TYPE:
setType((ALSSignatureDeclaration)null);
return;
}
super.eUnset(featureID);
}
/**
*
*
* @generated
*/
@Override
public boolean eIsSet(int featureID)
{
switch (featureID)
{
case AlloyLanguagePackage.ALS_SIG_SCOPE__EXACTLY:
return exactly != EXACTLY_EDEFAULT;
case AlloyLanguagePackage.ALS_SIG_SCOPE__TYPE:
return type != null;
}
return super.eIsSet(featureID);
}
/**
*
*
* @generated
*/
@Override
public String toString()
{
if (eIsProxy()) return super.toString();
StringBuffer result = new StringBuffer(super.toString());
result.append(" (exactly: ");
result.append(exactly);
result.append(')');
return result.toString();
}
} //ALSSigScopeImpl