/** */ package fr.tpt.mem4csd.loss.impl; import fr.tpt.mem4csd.loss.Complex; import fr.tpt.mem4csd.loss.Link; import fr.tpt.mem4csd.loss.LossFactory; import fr.tpt.mem4csd.loss.LossPackage; import fr.tpt.mem4csd.loss.NamedObject; import fr.tpt.mem4csd.loss.Primitive; import org.eclipse.emf.ecore.EAttribute; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.EPackage; import org.eclipse.emf.ecore.EReference; import org.eclipse.emf.ecore.impl.EPackageImpl; /** * * An implementation of the model Package. * * @generated */ public class LossPackageImpl extends EPackageImpl implements LossPackage { /** * * * @generated */ private EClass namedObjectEClass = null; /** * * * @generated */ private EClass primitiveEClass = null; /** * * * @generated */ private EClass linkEClass = null; /** * * * @generated */ private EClass complexEClass = null; /** * Creates an instance of the model Package, registered with * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package * package URI value. *

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. * * * @see org.eclipse.emf.ecore.EPackage.Registry * @see fr.tpt.mem4csd.loss.LossPackage#eNS_URI * @see #init() * @generated */ private LossPackageImpl() { super(eNS_URI, LossFactory.eINSTANCE); } /** * * * @generated */ private static boolean isInited = false; /** * Creates, registers, and initializes the Package for this model, and for any others upon which it depends. * *

This method is used to initialize {@link LossPackage#eINSTANCE} when that field is accessed. * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. * * * @see #eNS_URI * @see #createPackageContents() * @see #initializePackageContents() * @generated */ public static LossPackage init() { if (isInited) return (LossPackage) EPackage.Registry.INSTANCE.getEPackage(LossPackage.eNS_URI); // Obtain or create and register package Object registeredLossPackage = EPackage.Registry.INSTANCE.get(eNS_URI); LossPackageImpl theLossPackage = registeredLossPackage instanceof LossPackageImpl ? (LossPackageImpl) registeredLossPackage : new LossPackageImpl(); isInited = true; // Create package meta-data objects theLossPackage.createPackageContents(); // Initialize created meta-data theLossPackage.initializePackageContents(); // Mark meta-data to indicate it can't be changed theLossPackage.freeze(); // Update the registry and return the package EPackage.Registry.INSTANCE.put(LossPackage.eNS_URI, theLossPackage); return theLossPackage; } /** * * * @generated */ @Override public EClass getNamedObject() { return namedObjectEClass; } /** * * * @generated */ @Override public EAttribute getNamedObject_Name() { return (EAttribute) namedObjectEClass.getEStructuralFeatures().get(0); } /** * * * @generated */ @Override public EAttribute getNamedObject_ClassName() { return (EAttribute) namedObjectEClass.getEStructuralFeatures().get(1); } /** * * * @generated */ @Override public EClass getPrimitive() { return primitiveEClass; } /** * * * @generated */ @Override public EReference getPrimitive_Type() { return (EReference) primitiveEClass.getEStructuralFeatures().get(0); } /** * * * @generated */ @Override public EClass getLink() { return linkEClass; } /** * * * @generated */ @Override public EReference getLink_ReferenceTo() { return (EReference) linkEClass.getEStructuralFeatures().get(0); } /** * * * @generated */ @Override public EClass getComplex() { return complexEClass; } /** * * * @generated */ @Override public EReference getComplex_Primitives() { return (EReference) complexEClass.getEStructuralFeatures().get(0); } /** * * * @generated */ @Override public EReference getComplex_Reference() { return (EReference) complexEClass.getEStructuralFeatures().get(1); } /** * * * @generated */ @Override public LossFactory getLossFactory() { return (LossFactory) getEFactoryInstance(); } /** * * * @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. * * * @generated */ public void createPackageContents() { if (isCreated) return; isCreated = true; // Create classes and their features namedObjectEClass = createEClass(NAMED_OBJECT); createEAttribute(namedObjectEClass, NAMED_OBJECT__NAME); createEAttribute(namedObjectEClass, NAMED_OBJECT__CLASS_NAME); primitiveEClass = createEClass(PRIMITIVE); createEReference(primitiveEClass, PRIMITIVE__TYPE); linkEClass = createEClass(LINK); createEReference(linkEClass, LINK__REFERENCE_TO); complexEClass = createEClass(COMPLEX); createEReference(complexEClass, COMPLEX__PRIMITIVES); createEReference(complexEClass, COMPLEX__REFERENCE); } /** * * * @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. * * * @generated */ public void initializePackageContents() { if (isInitialized) return; isInitialized = true; // Initialize package setName(eNAME); setNsPrefix(eNS_PREFIX); setNsURI(eNS_URI); // Create type parameters // Set bounds for type parameters // Add supertypes to classes namedObjectEClass.getESuperTypes().add(ecorePackage.getEObject()); primitiveEClass.getESuperTypes().add(this.getNamedObject()); linkEClass.getESuperTypes().add(this.getPrimitive()); complexEClass.getESuperTypes().add(this.getNamedObject()); // Initialize classes, features, and operations; add parameters initEClass(namedObjectEClass, NamedObject.class, "NamedObject", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEAttribute(getNamedObject_Name(), ecorePackage.getEString(), "name", null, 0, 1, NamedObject.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEAttribute(getNamedObject_ClassName(), ecorePackage.getEString(), "className", null, 1, 1, NamedObject.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEClass(primitiveEClass, Primitive.class, "Primitive", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEReference(getPrimitive_Type(), ecorePackage.getEObject(), null, "type", null, 1, 1, Primitive.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEClass(linkEClass, Link.class, "Link", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEReference(getLink_ReferenceTo(), this.getComplex(), null, "referenceTo", null, 1, 1, Link.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEClass(complexEClass, Complex.class, "Complex", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEReference(getComplex_Primitives(), this.getPrimitive(), null, "primitives", null, 0, -1, Complex.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEReference(getComplex_Reference(), ecorePackage.getEObject(), null, "reference", null, 1, 1, Complex.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); // Create resource createResource(eNS_URI); } } //LossPackageImpl