org.nasdanika.models.coverage.impl.CoverageFactoryImpl Maven / Gradle / Ivy
/**
*/
package org.nasdanika.models.coverage.impl;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.impl.EFactoryImpl;
import org.eclipse.emf.ecore.plugin.EcorePlugin;
import org.nasdanika.models.coverage.*;
/**
*
* An implementation of the model Factory.
*
* @generated
*/
public class CoverageFactoryImpl extends EFactoryImpl implements CoverageFactory {
/**
* Creates the default factory implementation.
*
*
* @generated
*/
public static CoverageFactory init() {
try {
CoverageFactory theCoverageFactory = (CoverageFactory)EPackage.Registry.INSTANCE.getEFactory(CoveragePackage.eNS_URI);
if (theCoverageFactory != null) {
return theCoverageFactory;
}
}
catch (Exception exception) {
EcorePlugin.INSTANCE.log(exception);
}
return new CoverageFactoryImpl();
}
/**
* Creates an instance of the factory.
*
*
* @generated
*/
public CoverageFactoryImpl() {
super();
}
/**
*
*
* @generated
*/
@Override
public EObject create(EClass eClass) {
switch (eClass.getClassifierID()) {
case CoveragePackage.COUNTER: return createCounter();
case CoveragePackage.COVERAGE: return createCoverage();
case CoveragePackage.SESSION: return createSession();
case CoveragePackage.MODULE_COVERAGE: return createModuleCoverage();
case CoveragePackage.PACKAGE_COVERAGE: return createPackageCoverage();
case CoveragePackage.LINE: return createLine();
case CoveragePackage.SOURCE_COVERAGE: return createSourceCoverage();
case CoveragePackage.CLASS_COVERAGE: return createClassCoverage();
case CoveragePackage.METHOD_COVERAGE: return createMethodCoverage();
case CoveragePackage.SOURCE_FILE_COVERAGE: return createSourceFileCoverage();
default:
throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
}
}
/**
*
*
* @generated
*/
@Override
public Counter createCounter() {
CounterImpl counter = new CounterImpl();
return counter;
}
/**
*
*
* @generated
*/
@Override
public Coverage createCoverage() {
CoverageImpl coverage = new CoverageImpl();
return coverage;
}
/**
*
*
* @generated
*/
@Override
public Session createSession() {
SessionImpl session = new SessionImpl();
return session;
}
/**
*
*
* @generated
*/
@Override
public ModuleCoverage createModuleCoverage() {
ModuleCoverageImpl moduleCoverage = new ModuleCoverageImpl();
return moduleCoverage;
}
/**
*
*
* @generated
*/
@Override
public PackageCoverage createPackageCoverage() {
PackageCoverageImpl packageCoverage = new PackageCoverageImpl();
return packageCoverage;
}
/**
*
*
* @generated
*/
@Override
public Line createLine() {
LineImpl line = new LineImpl();
return line;
}
/**
*
*
* @generated
*/
@Override
public SourceCoverage createSourceCoverage() {
SourceCoverageImpl sourceCoverage = new SourceCoverageImpl();
return sourceCoverage;
}
/**
*
*
* @generated
*/
@Override
public ClassCoverage createClassCoverage() {
ClassCoverageImpl classCoverage = new ClassCoverageImpl();
return classCoverage;
}
/**
*
*
* @generated
*/
@Override
public MethodCoverage createMethodCoverage() {
MethodCoverageImpl methodCoverage = new MethodCoverageImpl();
return methodCoverage;
}
/**
*
*
* @generated
*/
@Override
public SourceFileCoverage createSourceFileCoverage() {
SourceFileCoverageImpl sourceFileCoverage = new SourceFileCoverageImpl();
return sourceFileCoverage;
}
/**
*
*
* @generated
*/
@Override
public CoveragePackage getCoveragePackage() {
return (CoveragePackage)getEPackage();
}
/**
*
*
* @deprecated
* @generated
*/
@Deprecated
public static CoveragePackage getPackage() {
return CoveragePackage.eINSTANCE;
}
} //CoverageFactoryImpl