/** * <copyright> * </copyright> * * $Id$ */ package org.reuseware.air.language.componentmodel.impl; 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; import org.reuseware.air.language.componentmodel.AbstractFragmentType; import org.reuseware.air.language.componentmodel.AbstractVariationPointName; import org.reuseware.air.language.componentmodel.ComponentmodelFactory; import org.reuseware.air.language.componentmodel.ComponentmodelPackage; import org.reuseware.air.language.componentmodel.Composer; import org.reuseware.air.language.componentmodel.FragmentType; import org.reuseware.air.language.componentmodel.FragmentTypeSlot; import org.reuseware.air.language.componentmodel.Location; import org.reuseware.air.language.componentmodel.Slot; import org.reuseware.air.language.componentmodel.VariationPoint; import org.reuseware.air.language.componentmodel.VariationPointName; /** * <!-- begin-user-doc --> * An implementation of the model <b>Package</b>. * <!-- end-user-doc --> * @generated */ public class ComponentmodelPackageImpl extends EPackageImpl implements ComponentmodelPackage { /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ private EClass variationPointEClass = null; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ private EClass composerEClass = null; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ private EClass slotEClass = null; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ private EClass locationEClass = null; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ private EClass abstractVariationPointNameEClass = null; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ private EClass variationPointNameEClass = null; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ private EClass abstractFragmentTypeEClass = null; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ private EClass fragmentTypeEClass = null; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ private EClass fragmentTypeSlotEClass = 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 org.reuseware.air.language.componentmodel.ComponentmodelPackage#eNS_URI * @see #init() * @generated */ private ComponentmodelPackageImpl() { super(eNS_URI, ComponentmodelFactory.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. Simple * dependencies are satisfied by calling this method on all * dependent packages before doing anything else. This method drives * initialization for interdependent packages directly, in parallel * with this package, itself. * <p>Of this package and its interdependencies, all packages which * have not yet been registered by their URI values are first created * and registered. The packages are then initialized in two steps: * meta-model objects for all of the packages are created before any * are initialized, since one package's meta-model objects may refer to * those of another. * <p>Invocation of this method will not affect any packages that have * already been initialized. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #eNS_URI * @see #createPackageContents() * @see #initializePackageContents() * @generated */ public static ComponentmodelPackage init() { if (isInited) return (ComponentmodelPackage)EPackage.Registry.INSTANCE.getEPackage(ComponentmodelPackage.eNS_URI); // Obtain or create and register package ComponentmodelPackageImpl theComponentmodelPackage = (ComponentmodelPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(eNS_URI) instanceof ComponentmodelPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(eNS_URI) : new ComponentmodelPackageImpl()); isInited = true; // Create package meta-data objects theComponentmodelPackage.createPackageContents(); // Initialize created meta-data theComponentmodelPackage.initializePackageContents(); // Mark meta-data to indicate it can't be changed theComponentmodelPackage.freeze(); return theComponentmodelPackage; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EClass getVariationPoint() { return variationPointEClass; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EReference getVariationPoint_Type() { return (EReference)variationPointEClass.getEStructuralFeatures().get(0); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EReference getVariationPoint_Name() { return (EReference)variationPointEClass.getEStructuralFeatures().get(1); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EClass getComposer() { return composerEClass; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EClass getSlot() { return slotEClass; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EClass getLocation() { return locationEClass; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EAttribute getLocation_Path() { return (EAttribute)locationEClass.getEStructuralFeatures().get(0); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EClass getAbstractVariationPointName() { return abstractVariationPointNameEClass; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EClass getVariationPointName() { return variationPointNameEClass; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EAttribute getVariationPointName_Name() { return (EAttribute)variationPointNameEClass.getEStructuralFeatures().get(0); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EClass getAbstractFragmentType() { return abstractFragmentTypeEClass; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EClass getFragmentType() { return fragmentTypeEClass; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EAttribute getFragmentType_Type() { return (EAttribute)fragmentTypeEClass.getEStructuralFeatures().get(0); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EClass getFragmentTypeSlot() { return fragmentTypeSlotEClass; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public ComponentmodelFactory getComponentmodelFactory() { return (ComponentmodelFactory)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 variationPointEClass = createEClass(VARIATION_POINT); createEReference(variationPointEClass, VARIATION_POINT__TYPE); createEReference(variationPointEClass, VARIATION_POINT__NAME); composerEClass = createEClass(COMPOSER); slotEClass = createEClass(SLOT); locationEClass = createEClass(LOCATION); createEAttribute(locationEClass, LOCATION__PATH); abstractVariationPointNameEClass = createEClass(ABSTRACT_VARIATION_POINT_NAME); variationPointNameEClass = createEClass(VARIATION_POINT_NAME); createEAttribute(variationPointNameEClass, VARIATION_POINT_NAME__NAME); abstractFragmentTypeEClass = createEClass(ABSTRACT_FRAGMENT_TYPE); fragmentTypeEClass = createEClass(FRAGMENT_TYPE); createEAttribute(fragmentTypeEClass, FRAGMENT_TYPE__TYPE); fragmentTypeSlotEClass = createEClass(FRAGMENT_TYPE_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); // Create type parameters // Set bounds for type parameters // Add supertypes to classes slotEClass.getESuperTypes().add(this.getVariationPoint()); variationPointNameEClass.getESuperTypes().add(this.getAbstractVariationPointName()); fragmentTypeEClass.getESuperTypes().add(this.getAbstractFragmentType()); fragmentTypeSlotEClass.getESuperTypes().add(this.getAbstractFragmentType()); fragmentTypeSlotEClass.getESuperTypes().add(this.getSlot()); // Initialize classes and features; add operations and parameters initEClass(variationPointEClass, VariationPoint.class, "VariationPoint", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEReference(getVariationPoint_Type(), this.getAbstractFragmentType(), null, "type", null, 0, 1, VariationPoint.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEReference(getVariationPoint_Name(), this.getAbstractVariationPointName(), null, "name", null, 1, 1, VariationPoint.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEClass(composerEClass, Composer.class, "Composer", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEClass(slotEClass, Slot.class, "Slot", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEClass(locationEClass, Location.class, "Location", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEAttribute(getLocation_Path(), ecorePackage.getEString(), "path", null, 1, 1, Location.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEClass(abstractVariationPointNameEClass, AbstractVariationPointName.class, "AbstractVariationPointName", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEClass(variationPointNameEClass, VariationPointName.class, "VariationPointName", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEAttribute(getVariationPointName_Name(), ecorePackage.getEString(), "name", null, 1, 1, VariationPointName.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEClass(abstractFragmentTypeEClass, AbstractFragmentType.class, "AbstractFragmentType", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEClass(fragmentTypeEClass, FragmentType.class, "FragmentType", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEAttribute(getFragmentType_Type(), ecorePackage.getEString(), "type", null, 1, 1, FragmentType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEClass(fragmentTypeSlotEClass, FragmentTypeSlot.class, "FragmentTypeSlot", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); // Create resource createResource(eNS_URI); } } //ComponentmodelPackageImpl