/** */ package linkedList.impl; import linkedList.Element; import linkedList.LinkedListFactory; import linkedList.LinkedListPackage; import linkedList.List; 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 LinkedListPackageImpl extends EPackageImpl implements LinkedListPackage { /** * * * @generated */ private EClass listEClass = null; /** * * * @generated */ private EClass elementEClass = null; /** * * * @generated */ private EClass objectEClass = 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 linkedList.LinkedListPackage#eNS_URI * @see #init() * @generated */ private LinkedListPackageImpl() { super(eNS_URI, LinkedListFactory.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 LinkedListPackage#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 LinkedListPackage init() { if (isInited) return (LinkedListPackage)EPackage.Registry.INSTANCE.getEPackage(LinkedListPackage.eNS_URI); // Obtain or create and register package Object registeredLinkedListPackage = EPackage.Registry.INSTANCE.get(eNS_URI); LinkedListPackageImpl theLinkedListPackage = registeredLinkedListPackage instanceof LinkedListPackageImpl ? (LinkedListPackageImpl)registeredLinkedListPackage : new LinkedListPackageImpl(); isInited = true; // Create package meta-data objects theLinkedListPackage.createPackageContents(); // Initialize created meta-data theLinkedListPackage.initializePackageContents(); // Mark meta-data to indicate it can't be changed theLinkedListPackage.freeze(); // Update the registry and return the package EPackage.Registry.INSTANCE.put(LinkedListPackage.eNS_URI, theLinkedListPackage); return theLinkedListPackage; } /** * * * @generated */ public EClass getList() { return listEClass; } /** * * * @generated */ public EReference getList_First() { return (EReference)listEClass.getEStructuralFeatures().get(0); } /** * * * @generated */ public EClass getElement() { return elementEClass; } /** * * * @generated */ public EReference getElement_Value() { return (EReference)elementEClass.getEStructuralFeatures().get(0); } /** * * * @generated */ public EReference getElement_Next() { return (EReference)elementEClass.getEStructuralFeatures().get(1); } /** * * * @generated */ public EClass getObject() { return objectEClass; } /** * * * @generated */ public LinkedListFactory getLinkedListFactory() { return (LinkedListFactory)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 listEClass = createEClass(LIST); createEReference(listEClass, LIST__FIRST); elementEClass = createEClass(ELEMENT); createEReference(elementEClass, ELEMENT__VALUE); createEReference(elementEClass, ELEMENT__NEXT); objectEClass = createEClass(OBJECT); } /** * * * @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 // Initialize classes, features, and operations; add parameters initEClass(listEClass, List.class, "List", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEReference(getList_First(), this.getElement(), null, "first", null, 0, 1, List.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEClass(elementEClass, Element.class, "Element", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEReference(getElement_Value(), this.getObject(), null, "value", null, 1, 1, Element.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEReference(getElement_Next(), this.getElement(), null, "next", null, 0, 1, Element.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEClass(objectEClass, linkedList.Object.class, "Object", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); // Create resource createResource(eNS_URI); } } //LinkedListPackageImpl