/**
*/
package at.bestsolution.efxclipse.tooling.fxgraph.fXGraph.impl;
import at.bestsolution.efxclipse.tooling.fxgraph.fXGraph.FXGraphPackage;
import at.bestsolution.efxclipse.tooling.fxgraph.fXGraph.StaticCallValueProperty;
import at.bestsolution.efxclipse.tooling.fxgraph.fXGraph.ValueProperty;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.notify.NotificationChain;
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;
import org.eclipse.xtext.common.types.JvmTypeReference;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Static Call Value Property</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* <ul>
* <li>{@link at.bestsolution.efxclipse.tooling.fxgraph.fXGraph.impl.StaticCallValuePropertyImpl#getModifier <em>Modifier</em>}</li>
* <li>{@link at.bestsolution.efxclipse.tooling.fxgraph.fXGraph.impl.StaticCallValuePropertyImpl#getType <em>Type</em>}</li>
* <li>{@link at.bestsolution.efxclipse.tooling.fxgraph.fXGraph.impl.StaticCallValuePropertyImpl#getName <em>Name</em>}</li>
* <li>{@link at.bestsolution.efxclipse.tooling.fxgraph.fXGraph.impl.StaticCallValuePropertyImpl#getValue <em>Value</em>}</li>
* </ul>
* </p>
*
* @generated
*/
public class StaticCallValuePropertyImpl extends MinimalEObjectImpl.Container implements StaticCallValueProperty
{
/**
* The default value of the '{@link #getModifier() <em>Modifier</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getModifier()
* @generated
* @ordered
*/
protected static final String MODIFIER_EDEFAULT = null;
/**
* The cached value of the '{@link #getModifier() <em>Modifier</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getModifier()
* @generated
* @ordered
*/
protected String modifier = MODIFIER_EDEFAULT;
/**
* The cached value of the '{@link #getType() <em>Type</em>}' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getType()
* @generated
* @ordered
*/
protected JvmTypeReference type;
/**
* The default value of the '{@link #getName() <em>Name</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getName()
* @generated
* @ordered
*/
protected static final String NAME_EDEFAULT = null;
/**
* The cached value of the '{@link #getName() <em>Name</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getName()
* @generated
* @ordered
*/
protected String name = NAME_EDEFAULT;
/**
* The cached value of the '{@link #getValue() <em>Value</em>}' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getValue()
* @generated
* @ordered
*/
protected ValueProperty value;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected StaticCallValuePropertyImpl()
{
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass()
{
return FXGraphPackage.Literals.STATIC_CALL_VALUE_PROPERTY;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public String getModifier()
{
return modifier;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setModifier(String newModifier)
{
String oldModifier = modifier;
modifier = newModifier;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, FXGraphPackage.STATIC_CALL_VALUE_PROPERTY__MODIFIER, oldModifier, modifier));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public JvmTypeReference getType()
{
return type;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public NotificationChain basicSetType(JvmTypeReference newType, NotificationChain msgs)
{
JvmTypeReference oldType = type;
type = newType;
if (eNotificationRequired())
{
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FXGraphPackage.STATIC_CALL_VALUE_PROPERTY__TYPE, oldType, newType);
if (msgs == null) msgs = notification; else msgs.add(notification);
}
return msgs;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setType(JvmTypeReference newType)
{
if (newType != type)
{
NotificationChain msgs = null;
if (type != null)
msgs = ((InternalEObject)type).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FXGraphPackage.STATIC_CALL_VALUE_PROPERTY__TYPE, null, msgs);
if (newType != null)
msgs = ((InternalEObject)newType).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - FXGraphPackage.STATIC_CALL_VALUE_PROPERTY__TYPE, null, msgs);
msgs = basicSetType(newType, msgs);
if (msgs != null) msgs.dispatch();
}
else if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, FXGraphPackage.STATIC_CALL_VALUE_PROPERTY__TYPE, newType, newType));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public String getName()
{
return name;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setName(String newName)
{
String oldName = name;
name = newName;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, FXGraphPackage.STATIC_CALL_VALUE_PROPERTY__NAME, oldName, name));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public ValueProperty getValue()
{
return value;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public NotificationChain basicSetValue(ValueProperty newValue, NotificationChain msgs)
{
ValueProperty oldValue = value;
value = newValue;
if (eNotificationRequired())
{
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FXGraphPackage.STATIC_CALL_VALUE_PROPERTY__VALUE, oldValue, newValue);
if (msgs == null) msgs = notification; else msgs.add(notification);
}
return msgs;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setValue(ValueProperty newValue)
{
if (newValue != value)
{
NotificationChain msgs = null;
if (value != null)
msgs = ((InternalEObject)value).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FXGraphPackage.STATIC_CALL_VALUE_PROPERTY__VALUE, null, msgs);
if (newValue != null)
msgs = ((InternalEObject)newValue).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - FXGraphPackage.STATIC_CALL_VALUE_PROPERTY__VALUE, null, msgs);
msgs = basicSetValue(newValue, msgs);
if (msgs != null) msgs.dispatch();
}
else if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, FXGraphPackage.STATIC_CALL_VALUE_PROPERTY__VALUE, newValue, newValue));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
{
switch (featureID)
{
case FXGraphPackage.STATIC_CALL_VALUE_PROPERTY__TYPE:
return basicSetType(null, msgs);
case FXGraphPackage.STATIC_CALL_VALUE_PROPERTY__VALUE:
return basicSetValue(null, msgs);
}
return super.eInverseRemove(otherEnd, featureID, msgs);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType)
{
switch (featureID)
{
case FXGraphPackage.STATIC_CALL_VALUE_PROPERTY__MODIFIER:
return getModifier();
case FXGraphPackage.STATIC_CALL_VALUE_PROPERTY__TYPE:
return getType();
case FXGraphPackage.STATIC_CALL_VALUE_PROPERTY__NAME:
return getName();
case FXGraphPackage.STATIC_CALL_VALUE_PROPERTY__VALUE:
return getValue();
}
return super.eGet(featureID, resolve, coreType);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eSet(int featureID, Object newValue)
{
switch (featureID)
{
case FXGraphPackage.STATIC_CALL_VALUE_PROPERTY__MODIFIER:
setModifier((String)newValue);
return;
case FXGraphPackage.STATIC_CALL_VALUE_PROPERTY__TYPE:
setType((JvmTypeReference)newValue);
return;
case FXGraphPackage.STATIC_CALL_VALUE_PROPERTY__NAME:
setName((String)newValue);
return;
case FXGraphPackage.STATIC_CALL_VALUE_PROPERTY__VALUE:
setValue((ValueProperty)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID)
{
switch (featureID)
{
case FXGraphPackage.STATIC_CALL_VALUE_PROPERTY__MODIFIER:
setModifier(MODIFIER_EDEFAULT);
return;
case FXGraphPackage.STATIC_CALL_VALUE_PROPERTY__TYPE:
setType((JvmTypeReference)null);
return;
case FXGraphPackage.STATIC_CALL_VALUE_PROPERTY__NAME:
setName(NAME_EDEFAULT);
return;
case FXGraphPackage.STATIC_CALL_VALUE_PROPERTY__VALUE:
setValue((ValueProperty)null);
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID)
{
switch (featureID)
{
case FXGraphPackage.STATIC_CALL_VALUE_PROPERTY__MODIFIER:
return MODIFIER_EDEFAULT == null ? modifier != null : !MODIFIER_EDEFAULT.equals(modifier);
case FXGraphPackage.STATIC_CALL_VALUE_PROPERTY__TYPE:
return type != null;
case FXGraphPackage.STATIC_CALL_VALUE_PROPERTY__NAME:
return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
case FXGraphPackage.STATIC_CALL_VALUE_PROPERTY__VALUE:
return value != null;
}
return super.eIsSet(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public String toString()
{
if (eIsProxy()) return super.toString();
StringBuffer result = new StringBuffer(super.toString());
result.append(" (modifier: ");
result.append(modifier);
result.append(", name: ");
result.append(name);
result.append(')');
return result.toString();
}
} //StaticCallValuePropertyImpl