/**
* MSPDI is copyright Microsoft, Inc.
* Implementation wrapper in ecore done by Kestrel Technology LLC
*/
package net.certware.planning.mspdi.impl;
import java.util.Collection;
import net.certware.planning.mspdi.ExceptionType;
import net.certware.planning.mspdi.ExceptionsType;
import net.certware.planning.mspdi.MspdiPackage;
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.impl.EObjectImpl;
import org.eclipse.emf.ecore.util.EObjectContainmentEList;
import org.eclipse.emf.ecore.util.InternalEList;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Exceptions Type</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* <ul>
* <li>{@link net.certware.planning.mspdi.impl.ExceptionsTypeImpl#getException <em>Exception</em>}</li>
* </ul>
* </p>
*
* @generated
*/
public class ExceptionsTypeImpl extends EObjectImpl implements ExceptionsType {
/**
* The cached value of the '{@link #getException() <em>Exception</em>}' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getException()
* @generated
* @ordered
*/
protected EList<ExceptionType> exception;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected ExceptionsTypeImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return MspdiPackage.Literals.EXCEPTIONS_TYPE;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EList<ExceptionType> getException() {
if (exception == null) {
exception = new EObjectContainmentEList<ExceptionType>(ExceptionType.class, this, MspdiPackage.EXCEPTIONS_TYPE__EXCEPTION);
}
return exception;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
case MspdiPackage.EXCEPTIONS_TYPE__EXCEPTION:
return ((InternalEList<?>)getException()).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 MspdiPackage.EXCEPTIONS_TYPE__EXCEPTION:
return getException();
}
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 MspdiPackage.EXCEPTIONS_TYPE__EXCEPTION:
getException().clear();
getException().addAll((Collection<? extends ExceptionType>)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case MspdiPackage.EXCEPTIONS_TYPE__EXCEPTION:
getException().clear();
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case MspdiPackage.EXCEPTIONS_TYPE__EXCEPTION:
return exception != null && !exception.isEmpty();
}
return super.eIsSet(featureID);
}
} //ExceptionsTypeImpl