195 lines
5.5 KiB
Java
195 lines
5.5 KiB
Java
/**
|
|
*/
|
|
package mutator.impl;
|
|
|
|
import de.mdelab.workflow.WorkflowPackage;
|
|
|
|
import de.mdelab.workflow.components.ComponentsPackage;
|
|
|
|
import de.mdelab.workflow.helpers.HelpersPackage;
|
|
|
|
import mutator.MutatorFactory;
|
|
import mutator.MutatorPackage;
|
|
import mutator.RandomMutateModel;
|
|
|
|
import org.eclipse.emf.ecore.EAttribute;
|
|
import org.eclipse.emf.ecore.EClass;
|
|
import org.eclipse.emf.ecore.EPackage;
|
|
|
|
import org.eclipse.emf.ecore.impl.EPackageImpl;
|
|
|
|
/**
|
|
* <!-- begin-user-doc -->
|
|
* An implementation of the model <b>Package</b>.
|
|
* <!-- end-user-doc -->
|
|
* @generated
|
|
*/
|
|
public class MutatorPackageImpl extends EPackageImpl implements MutatorPackage {
|
|
/**
|
|
* <!-- begin-user-doc -->
|
|
* <!-- end-user-doc -->
|
|
* @generated
|
|
*/
|
|
private EClass randomMutateModelEClass = null;
|
|
|
|
/**
|
|
* Creates an instance of the model <b>Package</b>, registered with
|
|
* {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
|
|
* package URI value.
|
|
* <p>Note: the correct way to create the package is via the static
|
|
* factory method {@link #init init()}, which also performs
|
|
* initialization of the package, or returns the registered package,
|
|
* if one already exists.
|
|
* <!-- begin-user-doc -->
|
|
* <!-- end-user-doc -->
|
|
* @see org.eclipse.emf.ecore.EPackage.Registry
|
|
* @see mutator.MutatorPackage#eNS_URI
|
|
* @see #init()
|
|
* @generated
|
|
*/
|
|
private MutatorPackageImpl() {
|
|
super(eNS_URI, MutatorFactory.eINSTANCE);
|
|
}
|
|
/**
|
|
* <!-- begin-user-doc -->
|
|
* <!-- end-user-doc -->
|
|
* @generated
|
|
*/
|
|
private static boolean isInited = false;
|
|
|
|
/**
|
|
* Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends.
|
|
*
|
|
* <p>This method is used to initialize {@link MutatorPackage#eINSTANCE} when that field is accessed.
|
|
* Clients should not invoke it directly. Instead, they should simply access that field to obtain the package.
|
|
* <!-- begin-user-doc -->
|
|
* <!-- end-user-doc -->
|
|
* @see #eNS_URI
|
|
* @see #createPackageContents()
|
|
* @see #initializePackageContents()
|
|
* @generated
|
|
*/
|
|
public static MutatorPackage init() {
|
|
if (isInited) return (MutatorPackage)EPackage.Registry.INSTANCE.getEPackage(MutatorPackage.eNS_URI);
|
|
|
|
// Obtain or create and register package
|
|
Object registeredMutatorPackage = EPackage.Registry.INSTANCE.get(eNS_URI);
|
|
MutatorPackageImpl theMutatorPackage = registeredMutatorPackage instanceof MutatorPackageImpl ? (MutatorPackageImpl)registeredMutatorPackage : new MutatorPackageImpl();
|
|
|
|
isInited = true;
|
|
|
|
// Initialize simple dependencies
|
|
WorkflowPackage.eINSTANCE.eClass();
|
|
HelpersPackage.eINSTANCE.eClass();
|
|
ComponentsPackage.eINSTANCE.eClass();
|
|
|
|
// Create package meta-data objects
|
|
theMutatorPackage.createPackageContents();
|
|
|
|
// Initialize created meta-data
|
|
theMutatorPackage.initializePackageContents();
|
|
|
|
// Mark meta-data to indicate it can't be changed
|
|
theMutatorPackage.freeze();
|
|
|
|
// Update the registry and return the package
|
|
EPackage.Registry.INSTANCE.put(MutatorPackage.eNS_URI, theMutatorPackage);
|
|
return theMutatorPackage;
|
|
}
|
|
|
|
/**
|
|
* <!-- begin-user-doc -->
|
|
* <!-- end-user-doc -->
|
|
* @generated
|
|
*/
|
|
@Override
|
|
public EClass getRandomMutateModel() {
|
|
return randomMutateModelEClass;
|
|
}
|
|
|
|
/**
|
|
* <!-- begin-user-doc -->
|
|
* <!-- end-user-doc -->
|
|
* @generated
|
|
*/
|
|
@Override
|
|
public EAttribute getRandomMutateModel_ModelSlot() {
|
|
return (EAttribute)randomMutateModelEClass.getEStructuralFeatures().get(0);
|
|
}
|
|
|
|
/**
|
|
* <!-- begin-user-doc -->
|
|
* <!-- end-user-doc -->
|
|
* @generated
|
|
*/
|
|
@Override
|
|
public MutatorFactory getMutatorFactory() {
|
|
return (MutatorFactory)getEFactoryInstance();
|
|
}
|
|
|
|
/**
|
|
* <!-- begin-user-doc -->
|
|
* <!-- end-user-doc -->
|
|
* @generated
|
|
*/
|
|
private boolean isCreated = false;
|
|
|
|
/**
|
|
* Creates the meta-model objects for the package. This method is
|
|
* guarded to have no affect on any invocation but its first.
|
|
* <!-- begin-user-doc -->
|
|
* <!-- end-user-doc -->
|
|
* @generated
|
|
*/
|
|
public void createPackageContents() {
|
|
if (isCreated) return;
|
|
isCreated = true;
|
|
|
|
// Create classes and their features
|
|
randomMutateModelEClass = createEClass(RANDOM_MUTATE_MODEL);
|
|
createEAttribute(randomMutateModelEClass, RANDOM_MUTATE_MODEL__MODEL_SLOT);
|
|
}
|
|
|
|
/**
|
|
* <!-- begin-user-doc -->
|
|
* <!-- end-user-doc -->
|
|
* @generated
|
|
*/
|
|
private boolean isInitialized = false;
|
|
|
|
/**
|
|
* Complete the initialization of the package and its meta-model. This
|
|
* method is guarded to have no affect on any invocation but its first.
|
|
* <!-- begin-user-doc -->
|
|
* <!-- end-user-doc -->
|
|
* @generated
|
|
*/
|
|
public void initializePackageContents() {
|
|
if (isInitialized) return;
|
|
isInitialized = true;
|
|
|
|
// Initialize package
|
|
setName(eNAME);
|
|
setNsPrefix(eNS_PREFIX);
|
|
setNsURI(eNS_URI);
|
|
|
|
// Obtain other dependent packages
|
|
ComponentsPackage theComponentsPackage = (ComponentsPackage)EPackage.Registry.INSTANCE.getEPackage(ComponentsPackage.eNS_URI);
|
|
|
|
// Create type parameters
|
|
|
|
// Set bounds for type parameters
|
|
|
|
// Add supertypes to classes
|
|
randomMutateModelEClass.getESuperTypes().add(theComponentsPackage.getWorkflowComponent());
|
|
|
|
// Initialize classes, features, and operations; add parameters
|
|
initEClass(randomMutateModelEClass, RandomMutateModel.class, "RandomMutateModel", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
|
|
initEAttribute(getRandomMutateModel_ModelSlot(), ecorePackage.getEString(), "modelSlot", null, 1, 1, RandomMutateModel.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
|
|
|
|
// Create resource
|
|
createResource(eNS_URI);
|
|
}
|
|
|
|
} //MutatorPackageImpl
|