/** */ package simpleStatechart.impl; 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 simpleStatechart.Entry; import simpleStatechart.SimpleStatechartFactory; import simpleStatechart.SimpleStatechartPackage; import simpleStatechart.State; import simpleStatechart.Statechart; /** * * An implementation of the model Package. * * @generated */ public class SimpleStatechartPackageImpl extends EPackageImpl implements SimpleStatechartPackage { /** * * * @generated */ private EClass stateEClass = null; /** * * * @generated */ private EClass entryEClass = null; /** * * * @generated */ private EClass statechartEClass = 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 simpleStatechart.SimpleStatechartPackage#eNS_URI * @see #init() * @generated */ private SimpleStatechartPackageImpl() { super(eNS_URI, SimpleStatechartFactory.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 SimpleStatechartPackage#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 SimpleStatechartPackage init() { if (isInited) return (SimpleStatechartPackage)EPackage.Registry.INSTANCE.getEPackage(SimpleStatechartPackage.eNS_URI); // Obtain or create and register package Object registeredSimpleStatechartPackage = EPackage.Registry.INSTANCE.get(eNS_URI); SimpleStatechartPackageImpl theSimpleStatechartPackage = registeredSimpleStatechartPackage instanceof SimpleStatechartPackageImpl ? (SimpleStatechartPackageImpl)registeredSimpleStatechartPackage : new SimpleStatechartPackageImpl(); isInited = true; // Create package meta-data objects theSimpleStatechartPackage.createPackageContents(); // Initialize created meta-data theSimpleStatechartPackage.initializePackageContents(); // Mark meta-data to indicate it can't be changed theSimpleStatechartPackage.freeze(); // Update the registry and return the package EPackage.Registry.INSTANCE.put(SimpleStatechartPackage.eNS_URI, theSimpleStatechartPackage); return theSimpleStatechartPackage; } /** * * * @generated */ public EClass getState() { return stateEClass; } /** * * * @generated */ public EReference getState_Next() { return (EReference)stateEClass.getEStructuralFeatures().get(0); } /** * * * @generated */ public EClass getEntry() { return entryEClass; } /** * * * @generated */ public EReference getEntry_Entry() { return (EReference)entryEClass.getEStructuralFeatures().get(0); } /** * * * @generated */ public EClass getStatechart() { return statechartEClass; } /** * * * @generated */ public EReference getStatechart_State() { return (EReference)statechartEClass.getEStructuralFeatures().get(0); } /** * * * @generated */ public EReference getStatechart_Entry() { return (EReference)statechartEClass.getEStructuralFeatures().get(1); } /** * * * @generated */ public SimpleStatechartFactory getSimpleStatechartFactory() { return (SimpleStatechartFactory)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 stateEClass = createEClass(STATE); createEReference(stateEClass, STATE__NEXT); entryEClass = createEClass(ENTRY); createEReference(entryEClass, ENTRY__ENTRY); statechartEClass = createEClass(STATECHART); createEReference(statechartEClass, STATECHART__STATE); createEReference(statechartEClass, STATECHART__ENTRY); } /** * * * @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(stateEClass, State.class, "State", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEReference(getState_Next(), this.getState(), null, "next", null, 0, -1, State.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEClass(entryEClass, Entry.class, "Entry", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEReference(getEntry_Entry(), this.getState(), null, "entry", null, 0, 1, Entry.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEClass(statechartEClass, Statechart.class, "Statechart", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEReference(getStatechart_State(), this.getState(), null, "state", null, 0, -1, Statechart.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEReference(getStatechart_Entry(), this.getEntry(), null, "entry", null, 1, 1, Statechart.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); } } //SimpleStatechartPackageImpl