98 lines
2.1 KiB
Java
98 lines
2.1 KiB
Java
/**
|
|
*/
|
|
package mutator.impl;
|
|
|
|
import mutator.*;
|
|
|
|
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;
|
|
|
|
/**
|
|
* <!-- begin-user-doc -->
|
|
* An implementation of the model <b>Factory</b>.
|
|
* <!-- end-user-doc -->
|
|
* @generated
|
|
*/
|
|
public class MutatorFactoryImpl extends EFactoryImpl implements MutatorFactory {
|
|
/**
|
|
* Creates the default factory implementation.
|
|
* <!-- begin-user-doc -->
|
|
* <!-- end-user-doc -->
|
|
* @generated
|
|
*/
|
|
public static MutatorFactory init() {
|
|
try {
|
|
MutatorFactory theMutatorFactory = (MutatorFactory)EPackage.Registry.INSTANCE.getEFactory(MutatorPackage.eNS_URI);
|
|
if (theMutatorFactory != null) {
|
|
return theMutatorFactory;
|
|
}
|
|
}
|
|
catch (Exception exception) {
|
|
EcorePlugin.INSTANCE.log(exception);
|
|
}
|
|
return new MutatorFactoryImpl();
|
|
}
|
|
|
|
/**
|
|
* Creates an instance of the factory.
|
|
* <!-- begin-user-doc -->
|
|
* <!-- end-user-doc -->
|
|
* @generated
|
|
*/
|
|
public MutatorFactoryImpl() {
|
|
super();
|
|
}
|
|
|
|
/**
|
|
* <!-- begin-user-doc -->
|
|
* <!-- end-user-doc -->
|
|
* @generated
|
|
*/
|
|
@Override
|
|
public EObject create(EClass eClass) {
|
|
switch (eClass.getClassifierID()) {
|
|
case MutatorPackage.RANDOM_MUTATE_MODEL: return createRandomMutateModel();
|
|
default:
|
|
throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
|
|
}
|
|
}
|
|
|
|
/**
|
|
* <!-- begin-user-doc -->
|
|
* <!-- end-user-doc -->
|
|
* @generated
|
|
*/
|
|
@Override
|
|
public RandomMutateModel createRandomMutateModel() {
|
|
RandomMutateModelImpl randomMutateModel = new RandomMutateModelImpl();
|
|
return randomMutateModel;
|
|
}
|
|
|
|
/**
|
|
* <!-- begin-user-doc -->
|
|
* <!-- end-user-doc -->
|
|
* @generated
|
|
*/
|
|
@Override
|
|
public MutatorPackage getMutatorPackage() {
|
|
return (MutatorPackage)getEPackage();
|
|
}
|
|
|
|
/**
|
|
* <!-- begin-user-doc -->
|
|
* <!-- end-user-doc -->
|
|
* @deprecated
|
|
* @generated
|
|
*/
|
|
@Deprecated
|
|
public static MutatorPackage getPackage() {
|
|
return MutatorPackage.eINSTANCE;
|
|
}
|
|
|
|
} //MutatorFactoryImpl
|