blob: 965822842d7a04f7691617ae968c18302d9e983b [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2015, 2016 Willink Transformations and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* E.D.Willink - initial API and implementation
*******************************************************************************/
/**
*/
package example2.classescs.impl;
import java.util.Collection;
import org.eclipse.emf.common.notify.NotificationChain;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.InternalEObject;
import org.eclipse.emf.ecore.util.EObjectContainmentEList;
import org.eclipse.emf.ecore.util.InternalEList;
import example2.classescs.ClassescsPackage;
import example2.classescs.PathElementCS;
import example2.classescs.PathNameCS;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Path Name CS</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* </p>
* <ul>
* <li>{@link example2.classescs.impl.PathNameCSImpl#getPath <em>Path</em>}</li>
* </ul>
*
* @generated
*/
public class PathNameCSImpl extends ElementCSImpl implements PathNameCS {
/**
* The cached value of the '{@link #getPath() <em>Path</em>}' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getPath()
* @generated
* @ordered
*/
protected EList<PathElementCS> path;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected PathNameCSImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return ClassescsPackage.Literals.PATH_NAME_CS;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public EList<PathElementCS> getPath() {
if (path == null) {
path = new EObjectContainmentEList<PathElementCS>(PathElementCS.class, this, ClassescsPackage.PATH_NAME_CS__PATH);
}
return path;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
case ClassescsPackage.PATH_NAME_CS__PATH:
return ((InternalEList<?>)getPath()).basicRemove(otherEnd, 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 ClassescsPackage.PATH_NAME_CS__PATH:
return getPath();
}
return super.eGet(featureID, resolve, coreType);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@SuppressWarnings("unchecked")
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case ClassescsPackage.PATH_NAME_CS__PATH:
getPath().clear();
getPath().addAll((Collection<? extends PathElementCS>)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case ClassescsPackage.PATH_NAME_CS__PATH:
getPath().clear();
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case ClassescsPackage.PATH_NAME_CS__PATH:
return path != null && !path.isEmpty();
}
return super.eIsSet(featureID);
}
} //PathNameCSImpl