/**
* <copyright>
* </copyright>
*
* $Id$
*/
package fr.inria.atlanmod.collaboro.notation.impl;
import fr.inria.atlanmod.collaboro.notation.NotationElement;
import fr.inria.atlanmod.collaboro.notation.NotationPackage;
import fr.inria.atlanmod.collaboro.notation.SyntaxOf;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.InternalEObject;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Syntax Of</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* <ul>
* <li>{@link fr.inria.atlanmod.collaboro.notation.impl.SyntaxOfImpl#getReference <em>Reference</em>}</li>
* <li>{@link fr.inria.atlanmod.collaboro.notation.impl.SyntaxOfImpl#getSeparator <em>Separator</em>}</li>
* </ul>
* </p>
*
* @generated
*/
public class SyntaxOfImpl extends NotationElementImpl implements SyntaxOf {
/**
* The cached value of the '{@link #getReference() <em>Reference</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getReference()
* @generated
* @ordered
*/
protected EReference reference;
/**
* The cached value of the '{@link #getSeparator() <em>Separator</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getSeparator()
* @generated
* @ordered
*/
protected NotationElement separator;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected SyntaxOfImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return NotationPackage.Literals.SYNTAX_OF;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getReference() {
if (reference != null && reference.eIsProxy()) {
InternalEObject oldReference = (InternalEObject)reference;
reference = (EReference)eResolveProxy(oldReference);
if (reference != oldReference) {
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.RESOLVE, NotationPackage.SYNTAX_OF__REFERENCE, oldReference, reference));
}
}
return reference;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference basicGetReference() {
return reference;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setReference(EReference newReference) {
EReference oldReference = reference;
reference = newReference;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, NotationPackage.SYNTAX_OF__REFERENCE, oldReference, reference));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public NotationElement getSeparator() {
if (separator != null && separator.eIsProxy()) {
InternalEObject oldSeparator = (InternalEObject)separator;
separator = (NotationElement)eResolveProxy(oldSeparator);
if (separator != oldSeparator) {
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.RESOLVE, NotationPackage.SYNTAX_OF__SEPARATOR, oldSeparator, separator));
}
}
return separator;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public NotationElement basicGetSeparator() {
return separator;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setSeparator(NotationElement newSeparator) {
NotationElement oldSeparator = separator;
separator = newSeparator;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, NotationPackage.SYNTAX_OF__SEPARATOR, oldSeparator, separator));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case NotationPackage.SYNTAX_OF__REFERENCE:
if (resolve) return getReference();
return basicGetReference();
case NotationPackage.SYNTAX_OF__SEPARATOR:
if (resolve) return getSeparator();
return basicGetSeparator();
}
return super.eGet(featureID, resolve, coreType);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case NotationPackage.SYNTAX_OF__REFERENCE:
setReference((EReference)newValue);
return;
case NotationPackage.SYNTAX_OF__SEPARATOR:
setSeparator((NotationElement)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case NotationPackage.SYNTAX_OF__REFERENCE:
setReference((EReference)null);
return;
case NotationPackage.SYNTAX_OF__SEPARATOR:
setSeparator((NotationElement)null);
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case NotationPackage.SYNTAX_OF__REFERENCE:
return reference != null;
case NotationPackage.SYNTAX_OF__SEPARATOR:
return separator != null;
}
return super.eIsSet(featureID);
}
} //SyntaxOfImpl