org.nasdanika.models.coverage.impl.ModuleCoverageImpl Maven / Gradle / Ivy
/**
*/
package org.nasdanika.models.coverage.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.InternalEList;
import org.nasdanika.models.coverage.CoveragePackage;
import org.nasdanika.models.coverage.ModuleCoverage;
import org.nasdanika.models.coverage.PackageCoverage;
import org.nasdanika.models.coverage.Session;
/**
*
* An implementation of the model object 'Module Coverage'.
*
*
* The following features are implemented:
*
*
* - {@link org.nasdanika.models.coverage.impl.ModuleCoverageImpl#getPackages Packages}
* - {@link org.nasdanika.models.coverage.impl.ModuleCoverageImpl#getSessions Sessions}
*
*
* @generated
*/
public class ModuleCoverageImpl extends CoverageImpl implements ModuleCoverage {
/**
*
*
* @generated
*/
protected ModuleCoverageImpl() {
super();
}
/**
*
*
* @generated
*/
@Override
protected EClass eStaticClass() {
return CoveragePackage.Literals.MODULE_COVERAGE;
}
/**
*
*
* @generated
*/
@SuppressWarnings("unchecked")
@Override
public EList getPackages() {
return (EList)eDynamicGet(CoveragePackage.MODULE_COVERAGE__PACKAGES, CoveragePackage.Literals.MODULE_COVERAGE__PACKAGES, true, true);
}
/**
*
*
* @generated
*/
@SuppressWarnings("unchecked")
@Override
public EList getSessions() {
return (EList)eDynamicGet(CoveragePackage.MODULE_COVERAGE__SESSIONS, CoveragePackage.Literals.MODULE_COVERAGE__SESSIONS, true, true);
}
/**
*
*
* @generated
*/
@Override
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
case CoveragePackage.MODULE_COVERAGE__PACKAGES:
return ((InternalEList>)getPackages()).basicRemove(otherEnd, msgs);
case CoveragePackage.MODULE_COVERAGE__SESSIONS:
return ((InternalEList>)getSessions()).basicRemove(otherEnd, msgs);
}
return super.eInverseRemove(otherEnd, featureID, msgs);
}
/**
*
*
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case CoveragePackage.MODULE_COVERAGE__PACKAGES:
return getPackages();
case CoveragePackage.MODULE_COVERAGE__SESSIONS:
return getSessions();
}
return super.eGet(featureID, resolve, coreType);
}
/**
*
*
* @generated
*/
@SuppressWarnings("unchecked")
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case CoveragePackage.MODULE_COVERAGE__PACKAGES:
getPackages().clear();
getPackages().addAll((Collection extends PackageCoverage>)newValue);
return;
case CoveragePackage.MODULE_COVERAGE__SESSIONS:
getSessions().clear();
getSessions().addAll((Collection extends Session>)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
*
*
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case CoveragePackage.MODULE_COVERAGE__PACKAGES:
getPackages().clear();
return;
case CoveragePackage.MODULE_COVERAGE__SESSIONS:
getSessions().clear();
return;
}
super.eUnset(featureID);
}
/**
*
*
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case CoveragePackage.MODULE_COVERAGE__PACKAGES:
return !getPackages().isEmpty();
case CoveragePackage.MODULE_COVERAGE__SESSIONS:
return !getSessions().isEmpty();
}
return super.eIsSet(featureID);
}
} //ModuleCoverageImpl