1 | /** |
2 | * <copyright> |
3 | * </copyright> |
4 | * |
5 | * $Id$ |
6 | */ |
7 | package de.uka.ipd.sdq.pcm.designdecision.PrimitiveTypes.impl; |
8 | |
9 | import de.uka.ipd.sdq.featuremodel.featuremodelPackage; |
10 | import de.uka.ipd.sdq.pcm.PcmPackage; |
11 | import de.uka.ipd.sdq.pcm.allocation.AllocationPackage; |
12 | |
13 | import de.uka.ipd.sdq.pcm.core.CorePackage; |
14 | |
15 | import de.uka.ipd.sdq.pcm.designdecision.PrimitiveTypes.PrimitiveTypesFactory; |
16 | import de.uka.ipd.sdq.pcm.designdecision.PrimitiveTypes.PrimitiveTypesPackage; |
17 | |
18 | import de.uka.ipd.sdq.pcm.designdecision.designdecisionPackage; |
19 | |
20 | import de.uka.ipd.sdq.pcm.designdecision.impl.designdecisionPackageImpl; |
21 | |
22 | import de.uka.ipd.sdq.pcm.parameter.ParameterPackage; |
23 | |
24 | import de.uka.ipd.sdq.pcm.protocol.ProtocolPackage; |
25 | |
26 | import de.uka.ipd.sdq.pcm.qosannotations.QosannotationsPackage; |
27 | |
28 | import de.uka.ipd.sdq.pcm.repository.RepositoryPackage; |
29 | |
30 | import de.uka.ipd.sdq.pcm.resourceenvironment.ResourceenvironmentPackage; |
31 | |
32 | import de.uka.ipd.sdq.pcm.resourcetype.ResourcetypePackage; |
33 | |
34 | import de.uka.ipd.sdq.pcm.seff.SeffPackage; |
35 | |
36 | import de.uka.ipd.sdq.pcm.subsystem.SubsystemPackage; |
37 | |
38 | import de.uka.ipd.sdq.pcm.system.SystemPackage; |
39 | |
40 | import de.uka.ipd.sdq.pcm.usagemodel.UsagemodelPackage; |
41 | |
42 | import org.eclipse.emf.ecore.EDataType; |
43 | import org.eclipse.emf.ecore.EPackage; |
44 | |
45 | import org.eclipse.emf.ecore.impl.EPackageImpl; |
46 | |
47 | /** |
48 | * <!-- begin-user-doc --> |
49 | * An implementation of the model <b>Package</b>. |
50 | * <!-- end-user-doc --> |
51 | * @generated |
52 | */ |
53 | public class PrimitiveTypesPackageImpl extends EPackageImpl implements PrimitiveTypesPackage { |
54 | /** |
55 | * <!-- begin-user-doc --> |
56 | * <!-- end-user-doc --> |
57 | * @generated |
58 | */ |
59 | private EDataType doubleEDataType = null; |
60 | |
61 | /** |
62 | * Creates an instance of the model <b>Package</b>, registered with |
63 | * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package |
64 | * package URI value. |
65 | * <p>Note: the correct way to create the package is via the static |
66 | * factory method {@link #init init()}, which also performs |
67 | * initialization of the package, or returns the registered package, |
68 | * if one already exists. |
69 | * <!-- begin-user-doc --> |
70 | * <!-- end-user-doc --> |
71 | * @see org.eclipse.emf.ecore.EPackage.Registry |
72 | * @see de.uka.ipd.sdq.pcm.designdecision.PrimitiveTypes.PrimitiveTypesPackage#eNS_URI |
73 | * @see #init() |
74 | * @generated |
75 | */ |
76 | private PrimitiveTypesPackageImpl() { |
77 | super(eNS_URI, PrimitiveTypesFactory.eINSTANCE); |
78 | } |
79 | |
80 | /** |
81 | * <!-- begin-user-doc --> |
82 | * <!-- end-user-doc --> |
83 | * @generated |
84 | */ |
85 | private static boolean isInited = false; |
86 | |
87 | /** |
88 | * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends. |
89 | * |
90 | * <p>This method is used to initialize {@link PrimitiveTypesPackage#eINSTANCE} when that field is accessed. |
91 | * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. |
92 | * <!-- begin-user-doc --> |
93 | * <!-- end-user-doc --> |
94 | * @see #eNS_URI |
95 | * @see #createPackageContents() |
96 | * @see #initializePackageContents() |
97 | * @generated |
98 | */ |
99 | public static PrimitiveTypesPackage init() { |
100 | if (isInited) return (PrimitiveTypesPackage)EPackage.Registry.INSTANCE.getEPackage(PrimitiveTypesPackage.eNS_URI); |
101 | |
102 | // Obtain or create and register package |
103 | PrimitiveTypesPackageImpl thePrimitiveTypesPackage = (PrimitiveTypesPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof PrimitiveTypesPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new PrimitiveTypesPackageImpl()); |
104 | |
105 | isInited = true; |
106 | |
107 | // Initialize simple dependencies |
108 | featuremodelPackage.eINSTANCE.eClass(); |
109 | PcmPackage.eINSTANCE.eClass(); |
110 | |
111 | // Obtain or create and register interdependencies |
112 | designdecisionPackageImpl thedesigndecisionPackage = (designdecisionPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(designdecisionPackage.eNS_URI) instanceof designdecisionPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(designdecisionPackage.eNS_URI) : designdecisionPackage.eINSTANCE); |
113 | |
114 | // Create package meta-data objects |
115 | thePrimitiveTypesPackage.createPackageContents(); |
116 | thedesigndecisionPackage.createPackageContents(); |
117 | |
118 | // Initialize created meta-data |
119 | thePrimitiveTypesPackage.initializePackageContents(); |
120 | thedesigndecisionPackage.initializePackageContents(); |
121 | |
122 | // Mark meta-data to indicate it can't be changed |
123 | thePrimitiveTypesPackage.freeze(); |
124 | |
125 | |
126 | // Update the registry and return the package |
127 | EPackage.Registry.INSTANCE.put(PrimitiveTypesPackage.eNS_URI, thePrimitiveTypesPackage); |
128 | return thePrimitiveTypesPackage; |
129 | } |
130 | |
131 | /** |
132 | * <!-- begin-user-doc --> |
133 | * <!-- end-user-doc --> |
134 | * @generated |
135 | */ |
136 | public EDataType getdouble() { |
137 | return doubleEDataType; |
138 | } |
139 | |
140 | /** |
141 | * <!-- begin-user-doc --> |
142 | * <!-- end-user-doc --> |
143 | * @generated |
144 | */ |
145 | public PrimitiveTypesFactory getPrimitiveTypesFactory() { |
146 | return (PrimitiveTypesFactory)getEFactoryInstance(); |
147 | } |
148 | |
149 | /** |
150 | * <!-- begin-user-doc --> |
151 | * <!-- end-user-doc --> |
152 | * @generated |
153 | */ |
154 | private boolean isCreated = false; |
155 | |
156 | /** |
157 | * Creates the meta-model objects for the package. This method is |
158 | * guarded to have no affect on any invocation but its first. |
159 | * <!-- begin-user-doc --> |
160 | * <!-- end-user-doc --> |
161 | * @generated |
162 | */ |
163 | public void createPackageContents() { |
164 | if (isCreated) return; |
165 | isCreated = true; |
166 | |
167 | // Create data types |
168 | doubleEDataType = createEDataType(DOUBLE); |
169 | } |
170 | |
171 | /** |
172 | * <!-- begin-user-doc --> |
173 | * <!-- end-user-doc --> |
174 | * @generated |
175 | */ |
176 | private boolean isInitialized = false; |
177 | |
178 | /** |
179 | * Complete the initialization of the package and its meta-model. This |
180 | * method is guarded to have no affect on any invocation but its first. |
181 | * <!-- begin-user-doc --> |
182 | * <!-- end-user-doc --> |
183 | * @generated |
184 | */ |
185 | public void initializePackageContents() { |
186 | if (isInitialized) return; |
187 | isInitialized = true; |
188 | |
189 | // Initialize package |
190 | setName(eNAME); |
191 | setNsPrefix(eNS_PREFIX); |
192 | setNsURI(eNS_URI); |
193 | |
194 | // Initialize data types |
195 | initEDataType(doubleEDataType, double.class, "double", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); |
196 | } |
197 | |
198 | } //PrimitiveTypesPackageImpl |