blob: 9f81fc8dbece909926f875a629a64ebd3fb0de34 [file] [log] [blame]
/**
*/
package org.eclipse.emf.ecp.ecview.common.model.core.impl;
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.ecp.ecview.common.model.binding.impl.YValueBindingEndpointImpl;
import org.eclipse.emf.ecp.ecview.common.model.core.CoreModelPackage;
import org.eclipse.emf.ecp.ecview.common.model.core.YActivateable;
import org.eclipse.emf.ecp.ecview.common.model.core.YActivatedEndpoint;
import org.eclipse.emf.ecp.ecview.common.model.core.YElement;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>YActivated Endpoint</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* <ul>
* <li>{@link org.eclipse.emf.ecp.ecview.common.model.core.impl.YActivatedEndpointImpl#getElement <em>Element</em>}</li>
* </ul>
* </p>
*
* @generated
*/
public class YActivatedEndpointImpl extends YValueBindingEndpointImpl implements YActivatedEndpoint {
/**
* The cached value of the '{@link #getElement() <em>Element</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getElement()
* @generated
* @ordered
*/
protected YActivateable element;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected YActivatedEndpointImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return CoreModelPackage.Literals.YACTIVATED_ENDPOINT;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public YActivateable getElement() {
if (element != null && element.eIsProxy()) {
InternalEObject oldElement = (InternalEObject)element;
element = (YActivateable)eResolveProxy(oldElement);
if (element != oldElement) {
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.RESOLVE, CoreModelPackage.YACTIVATED_ENDPOINT__ELEMENT, oldElement, element));
}
}
return element;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public YActivateable basicGetElement() {
return element;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setElement(YActivateable newElement) {
YActivateable oldElement = element;
element = newElement;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, CoreModelPackage.YACTIVATED_ENDPOINT__ELEMENT, oldElement, element));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case CoreModelPackage.YACTIVATED_ENDPOINT__ELEMENT:
if (resolve) return getElement();
return basicGetElement();
}
return super.eGet(featureID, resolve, coreType);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case CoreModelPackage.YACTIVATED_ENDPOINT__ELEMENT:
setElement((YActivateable)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case CoreModelPackage.YACTIVATED_ENDPOINT__ELEMENT:
setElement((YActivateable)null);
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case CoreModelPackage.YACTIVATED_ENDPOINT__ELEMENT:
return element != null;
}
return super.eIsSet(featureID);
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated NOT
*/
public boolean isBindsElement(YElement element) {
return element == getElement();
}
} //YActivatedEndpointImpl