/**
* <copyright>
* </copyright>
*
* $Id$
*/
package org.eclipse.bpel.wsil.model.inspection.impl;
import java.util.Collection;
import org.eclipse.bpel.wsil.model.inspection.InspectionPackage;
import org.eclipse.bpel.wsil.model.inspection.ItemWithAbstracts;
import org.eclipse.bpel.wsil.model.inspection.TypeOfAbstract;
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>Item With Abstracts</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* <ul>
* <li>{@link org.eclipse.bpel.wsil.model.inspection.impl.ItemWithAbstractsImpl#getAbstract <em>Abstract</em>}</li>
* </ul>
* </p>
*
* @generated
*/
public abstract class ItemWithAbstractsImpl extends EObjectImpl implements ItemWithAbstracts {
/**
* The cached value of the '{@link #getAbstract() <em>Abstract</em>}' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getAbstract()
* @generated
* @ordered
*/
protected EList<TypeOfAbstract> abstract_;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected ItemWithAbstractsImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return InspectionPackage.Literals.ITEM_WITH_ABSTRACTS;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EList<TypeOfAbstract> getAbstract() {
if (abstract_ == null) {
abstract_ = new EObjectContainmentEList<TypeOfAbstract>(TypeOfAbstract.class, this, InspectionPackage.ITEM_WITH_ABSTRACTS__ABSTRACT);
}
return abstract_;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
case InspectionPackage.ITEM_WITH_ABSTRACTS__ABSTRACT:
return ((InternalEList<?>)getAbstract()).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 InspectionPackage.ITEM_WITH_ABSTRACTS__ABSTRACT:
return getAbstract();
}
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 InspectionPackage.ITEM_WITH_ABSTRACTS__ABSTRACT:
getAbstract().clear();
getAbstract().addAll((Collection<? extends TypeOfAbstract>)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case InspectionPackage.ITEM_WITH_ABSTRACTS__ABSTRACT:
getAbstract().clear();
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case InspectionPackage.ITEM_WITH_ABSTRACTS__ABSTRACT:
return abstract_ != null && !abstract_.isEmpty();
}
return super.eIsSet(featureID);
}
} //ItemWithAbstractsImpl