org.nasdanika.models.coverage.impl.ClassCoverageImpl 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.ClassCoverage;
import org.nasdanika.models.coverage.CoveragePackage;
import org.nasdanika.models.coverage.MethodCoverage;
/**
*
* An implementation of the model object 'Class Coverage'.
*
*
* The following features are implemented:
*
*
* - {@link org.nasdanika.models.coverage.impl.ClassCoverageImpl#getId Id}
* - {@link org.nasdanika.models.coverage.impl.ClassCoverageImpl#getInterfaces Interfaces}
* - {@link org.nasdanika.models.coverage.impl.ClassCoverageImpl#getSuperType Super Type}
* - {@link org.nasdanika.models.coverage.impl.ClassCoverageImpl#getMethods Methods}
* - {@link org.nasdanika.models.coverage.impl.ClassCoverageImpl#getSignature Signature}
* - {@link org.nasdanika.models.coverage.impl.ClassCoverageImpl#isNoMatch No Match}
* - {@link org.nasdanika.models.coverage.impl.ClassCoverageImpl#getSourceFile Source File}
* - {@link org.nasdanika.models.coverage.impl.ClassCoverageImpl#getPackageName Package Name}
*
*
* @generated
*/
public class ClassCoverageImpl extends SourceCoverageImpl implements ClassCoverage {
/**
* The default value of the '{@link #getId() Id}' attribute.
*
*
* @see #getId()
* @generated
* @ordered
*/
protected static final long ID_EDEFAULT = 0L;
/**
* The default value of the '{@link #getSuperType() Super Type}' attribute.
*
*
* @see #getSuperType()
* @generated
* @ordered
*/
protected static final String SUPER_TYPE_EDEFAULT = null;
/**
* The default value of the '{@link #getSignature() Signature}' attribute.
*
*
* @see #getSignature()
* @generated
* @ordered
*/
protected static final String SIGNATURE_EDEFAULT = null;
/**
* The default value of the '{@link #isNoMatch() No Match}' attribute.
*
*
* @see #isNoMatch()
* @generated
* @ordered
*/
protected static final boolean NO_MATCH_EDEFAULT = false;
/**
* The default value of the '{@link #getSourceFile() Source File}' attribute.
*
*
* @see #getSourceFile()
* @generated
* @ordered
*/
protected static final String SOURCE_FILE_EDEFAULT = null;
/**
* The default value of the '{@link #getPackageName() Package Name}' attribute.
*
*
* @see #getPackageName()
* @generated
* @ordered
*/
protected static final String PACKAGE_NAME_EDEFAULT = null;
/**
*
*
* @generated
*/
protected ClassCoverageImpl() {
super();
}
/**
*
*
* @generated
*/
@Override
protected EClass eStaticClass() {
return CoveragePackage.Literals.CLASS_COVERAGE;
}
/**
*
*
* @generated
*/
@Override
public long getId() {
return (Long)eDynamicGet(CoveragePackage.CLASS_COVERAGE__ID, CoveragePackage.Literals.CLASS_COVERAGE__ID, true, true);
}
/**
*
*
* @generated
*/
@Override
public void setId(long newId) {
eDynamicSet(CoveragePackage.CLASS_COVERAGE__ID, CoveragePackage.Literals.CLASS_COVERAGE__ID, newId);
}
/**
*
*
* @generated
*/
@SuppressWarnings("unchecked")
@Override
public EList getInterfaces() {
return (EList)eDynamicGet(CoveragePackage.CLASS_COVERAGE__INTERFACES, CoveragePackage.Literals.CLASS_COVERAGE__INTERFACES, true, true);
}
/**
*
*
* @generated
*/
@Override
public String getSuperType() {
return (String)eDynamicGet(CoveragePackage.CLASS_COVERAGE__SUPER_TYPE, CoveragePackage.Literals.CLASS_COVERAGE__SUPER_TYPE, true, true);
}
/**
*
*
* @generated
*/
@Override
public void setSuperType(String newSuperType) {
eDynamicSet(CoveragePackage.CLASS_COVERAGE__SUPER_TYPE, CoveragePackage.Literals.CLASS_COVERAGE__SUPER_TYPE, newSuperType);
}
/**
*
*
* @generated
*/
@SuppressWarnings("unchecked")
@Override
public EList getMethods() {
return (EList)eDynamicGet(CoveragePackage.CLASS_COVERAGE__METHODS, CoveragePackage.Literals.CLASS_COVERAGE__METHODS, true, true);
}
/**
*
*
* @generated
*/
@Override
public String getSignature() {
return (String)eDynamicGet(CoveragePackage.CLASS_COVERAGE__SIGNATURE, CoveragePackage.Literals.CLASS_COVERAGE__SIGNATURE, true, true);
}
/**
*
*
* @generated
*/
@Override
public void setSignature(String newSignature) {
eDynamicSet(CoveragePackage.CLASS_COVERAGE__SIGNATURE, CoveragePackage.Literals.CLASS_COVERAGE__SIGNATURE, newSignature);
}
/**
*
*
* @generated
*/
@Override
public boolean isNoMatch() {
return (Boolean)eDynamicGet(CoveragePackage.CLASS_COVERAGE__NO_MATCH, CoveragePackage.Literals.CLASS_COVERAGE__NO_MATCH, true, true);
}
/**
*
*
* @generated
*/
@Override
public void setNoMatch(boolean newNoMatch) {
eDynamicSet(CoveragePackage.CLASS_COVERAGE__NO_MATCH, CoveragePackage.Literals.CLASS_COVERAGE__NO_MATCH, newNoMatch);
}
/**
*
*
* @generated
*/
@Override
public String getSourceFile() {
return (String)eDynamicGet(CoveragePackage.CLASS_COVERAGE__SOURCE_FILE, CoveragePackage.Literals.CLASS_COVERAGE__SOURCE_FILE, true, true);
}
/**
*
*
* @generated
*/
@Override
public void setSourceFile(String newSourceFile) {
eDynamicSet(CoveragePackage.CLASS_COVERAGE__SOURCE_FILE, CoveragePackage.Literals.CLASS_COVERAGE__SOURCE_FILE, newSourceFile);
}
/**
*
*
* @generated
*/
@Override
public String getPackageName() {
return (String)eDynamicGet(CoveragePackage.CLASS_COVERAGE__PACKAGE_NAME, CoveragePackage.Literals.CLASS_COVERAGE__PACKAGE_NAME, true, true);
}
/**
*
*
* @generated
*/
@Override
public void setPackageName(String newPackageName) {
eDynamicSet(CoveragePackage.CLASS_COVERAGE__PACKAGE_NAME, CoveragePackage.Literals.CLASS_COVERAGE__PACKAGE_NAME, newPackageName);
}
/**
*
*
* @generated
*/
@Override
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
case CoveragePackage.CLASS_COVERAGE__METHODS:
return ((InternalEList>)getMethods()).basicRemove(otherEnd, msgs);
}
return super.eInverseRemove(otherEnd, featureID, msgs);
}
/**
*
*
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case CoveragePackage.CLASS_COVERAGE__ID:
return getId();
case CoveragePackage.CLASS_COVERAGE__INTERFACES:
return getInterfaces();
case CoveragePackage.CLASS_COVERAGE__SUPER_TYPE:
return getSuperType();
case CoveragePackage.CLASS_COVERAGE__METHODS:
return getMethods();
case CoveragePackage.CLASS_COVERAGE__SIGNATURE:
return getSignature();
case CoveragePackage.CLASS_COVERAGE__NO_MATCH:
return isNoMatch();
case CoveragePackage.CLASS_COVERAGE__SOURCE_FILE:
return getSourceFile();
case CoveragePackage.CLASS_COVERAGE__PACKAGE_NAME:
return getPackageName();
}
return super.eGet(featureID, resolve, coreType);
}
/**
*
*
* @generated
*/
@SuppressWarnings("unchecked")
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case CoveragePackage.CLASS_COVERAGE__ID:
setId((Long)newValue);
return;
case CoveragePackage.CLASS_COVERAGE__INTERFACES:
getInterfaces().clear();
getInterfaces().addAll((Collection extends String>)newValue);
return;
case CoveragePackage.CLASS_COVERAGE__SUPER_TYPE:
setSuperType((String)newValue);
return;
case CoveragePackage.CLASS_COVERAGE__METHODS:
getMethods().clear();
getMethods().addAll((Collection extends MethodCoverage>)newValue);
return;
case CoveragePackage.CLASS_COVERAGE__SIGNATURE:
setSignature((String)newValue);
return;
case CoveragePackage.CLASS_COVERAGE__NO_MATCH:
setNoMatch((Boolean)newValue);
return;
case CoveragePackage.CLASS_COVERAGE__SOURCE_FILE:
setSourceFile((String)newValue);
return;
case CoveragePackage.CLASS_COVERAGE__PACKAGE_NAME:
setPackageName((String)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
*
*
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case CoveragePackage.CLASS_COVERAGE__ID:
setId(ID_EDEFAULT);
return;
case CoveragePackage.CLASS_COVERAGE__INTERFACES:
getInterfaces().clear();
return;
case CoveragePackage.CLASS_COVERAGE__SUPER_TYPE:
setSuperType(SUPER_TYPE_EDEFAULT);
return;
case CoveragePackage.CLASS_COVERAGE__METHODS:
getMethods().clear();
return;
case CoveragePackage.CLASS_COVERAGE__SIGNATURE:
setSignature(SIGNATURE_EDEFAULT);
return;
case CoveragePackage.CLASS_COVERAGE__NO_MATCH:
setNoMatch(NO_MATCH_EDEFAULT);
return;
case CoveragePackage.CLASS_COVERAGE__SOURCE_FILE:
setSourceFile(SOURCE_FILE_EDEFAULT);
return;
case CoveragePackage.CLASS_COVERAGE__PACKAGE_NAME:
setPackageName(PACKAGE_NAME_EDEFAULT);
return;
}
super.eUnset(featureID);
}
/**
*
*
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case CoveragePackage.CLASS_COVERAGE__ID:
return getId() != ID_EDEFAULT;
case CoveragePackage.CLASS_COVERAGE__INTERFACES:
return !getInterfaces().isEmpty();
case CoveragePackage.CLASS_COVERAGE__SUPER_TYPE:
return SUPER_TYPE_EDEFAULT == null ? getSuperType() != null : !SUPER_TYPE_EDEFAULT.equals(getSuperType());
case CoveragePackage.CLASS_COVERAGE__METHODS:
return !getMethods().isEmpty();
case CoveragePackage.CLASS_COVERAGE__SIGNATURE:
return SIGNATURE_EDEFAULT == null ? getSignature() != null : !SIGNATURE_EDEFAULT.equals(getSignature());
case CoveragePackage.CLASS_COVERAGE__NO_MATCH:
return isNoMatch() != NO_MATCH_EDEFAULT;
case CoveragePackage.CLASS_COVERAGE__SOURCE_FILE:
return SOURCE_FILE_EDEFAULT == null ? getSourceFile() != null : !SOURCE_FILE_EDEFAULT.equals(getSourceFile());
case CoveragePackage.CLASS_COVERAGE__PACKAGE_NAME:
return PACKAGE_NAME_EDEFAULT == null ? getPackageName() != null : !PACKAGE_NAME_EDEFAULT.equals(getPackageName());
}
return super.eIsSet(featureID);
}
} //ClassCoverageImpl