blob: cc01ffd4089a5c5d50cd25b5bbebaa6b05565690 [file] [log] [blame]
/**
* Copyright (c) 2011-2013 EclipseSource Muenchen GmbH and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
*/
package org.eclipse.emf.ecp.view.edapt.util.test.model.z.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.ecore.impl.MinimalEObjectImpl;
import org.eclipse.emf.ecp.view.edapt.util.test.model.y.EdaptTestY;
import org.eclipse.emf.ecp.view.edapt.util.test.model.z.EdaptTestZ;
import org.eclipse.emf.ecp.view.edapt.util.test.model.z.EdaptTestZPackage;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Z</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* </p>
* <ul>
* <li>{@link org.eclipse.emf.ecp.view.edapt.util.test.model.z.impl.EdaptTestZImpl#getY <em>Y</em>}</li>
* </ul>
*
* @generated
*/
public class EdaptTestZImpl extends MinimalEObjectImpl.Container implements EdaptTestZ {
/**
* The cached value of the '{@link #getY() <em>Y</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
*
* @see #getY()
* @generated
* @ordered
*/
protected EdaptTestY y;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
*
* @generated
*/
protected EdaptTestZImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
*
* @generated
*/
@Override
protected EClass eStaticClass() {
return EdaptTestZPackage.Literals.Z;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
*
* @generated
*/
@Override
public EdaptTestY getY() {
if (y != null && y.eIsProxy()) {
final InternalEObject oldY = (InternalEObject) y;
y = (EdaptTestY) eResolveProxy(oldY);
if (y != oldY) {
if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.RESOLVE, EdaptTestZPackage.Z__Y, oldY, y));
}
}
}
return y;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
*
* @generated
*/
public EdaptTestY basicGetY() {
return y;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
*
* @generated
*/
@Override
public void setY(EdaptTestY newY) {
final EdaptTestY oldY = y;
y = newY;
if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.SET, EdaptTestZPackage.Z__Y, oldY, y));
}
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
*
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case EdaptTestZPackage.Z__Y:
if (resolve) {
return getY();
}
return basicGetY();
}
return super.eGet(featureID, resolve, coreType);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
*
* @generated
*/
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case EdaptTestZPackage.Z__Y:
setY((EdaptTestY) newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
*
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case EdaptTestZPackage.Z__Y:
setY((EdaptTestY) null);
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
*
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case EdaptTestZPackage.Z__Y:
return y != null;
}
return super.eIsSet(featureID);
}
} // EdaptTestZImpl