| 1 | /** |
| 2 | * <copyright> |
| 3 | * </copyright> |
| 4 | * |
| 5 | * $Id$ |
| 6 | */ |
| 7 | package de.uka.ipd.sdq.dsexplore.qml.declarations.QMLDeclarations.impl; |
| 8 | |
| 9 | import de.uka.ipd.sdq.dsexplore.qml.contract.QMLContract.QMLContractPackage; |
| 10 | |
| 11 | import de.uka.ipd.sdq.dsexplore.qml.contract.QMLContract.impl.QMLContractPackageImpl; |
| 12 | |
| 13 | import de.uka.ipd.sdq.dsexplore.qml.contracttype.QMLContractType.QMLContractTypePackage; |
| 14 | |
| 15 | import de.uka.ipd.sdq.dsexplore.qml.contracttype.QMLContractType.impl.QMLContractTypePackageImpl; |
| 16 | |
| 17 | import de.uka.ipd.sdq.dsexplore.qml.declarations.QMLDeclarations.QMLDeclaration; |
| 18 | import de.uka.ipd.sdq.dsexplore.qml.declarations.QMLDeclarations.QMLDeclarations; |
| 19 | import de.uka.ipd.sdq.dsexplore.qml.declarations.QMLDeclarations.QMLDeclarationsFactory; |
| 20 | import de.uka.ipd.sdq.dsexplore.qml.declarations.QMLDeclarations.QMLDeclarationsPackage; |
| 21 | |
| 22 | import de.uka.ipd.sdq.dsexplore.qml.profile.QMLProfile.QMLProfilePackage; |
| 23 | |
| 24 | import de.uka.ipd.sdq.dsexplore.qml.profile.QMLProfile.impl.QMLProfilePackageImpl; |
| 25 | |
| 26 | import de.uka.ipd.sdq.identifier.IdentifierPackage; |
| 27 | |
| 28 | import de.uka.ipd.sdq.pcm.allocation.AllocationPackage; |
| 29 | |
| 30 | import de.uka.ipd.sdq.pcm.core.CorePackage; |
| 31 | |
| 32 | import de.uka.ipd.sdq.pcm.core.entity.EntityPackage; |
| 33 | |
| 34 | import de.uka.ipd.sdq.pcm.parameter.ParameterPackage; |
| 35 | |
| 36 | import de.uka.ipd.sdq.pcm.protocol.ProtocolPackage; |
| 37 | |
| 38 | import de.uka.ipd.sdq.pcm.qosannotations.QosannotationsPackage; |
| 39 | |
| 40 | import de.uka.ipd.sdq.pcm.repository.RepositoryPackage; |
| 41 | |
| 42 | import de.uka.ipd.sdq.pcm.resourceenvironment.ResourceenvironmentPackage; |
| 43 | |
| 44 | import de.uka.ipd.sdq.pcm.resourcetype.ResourcetypePackage; |
| 45 | |
| 46 | import de.uka.ipd.sdq.pcm.seff.SeffPackage; |
| 47 | |
| 48 | import de.uka.ipd.sdq.pcm.subsystem.SubsystemPackage; |
| 49 | |
| 50 | import de.uka.ipd.sdq.pcm.system.SystemPackage; |
| 51 | |
| 52 | import de.uka.ipd.sdq.pcm.usagemodel.UsagemodelPackage; |
| 53 | |
| 54 | import org.eclipse.emf.ecore.EClass; |
| 55 | import org.eclipse.emf.ecore.EPackage; |
| 56 | import org.eclipse.emf.ecore.EReference; |
| 57 | |
| 58 | import org.eclipse.emf.ecore.impl.EPackageImpl; |
| 59 | |
| 60 | /** |
| 61 | * <!-- begin-user-doc --> |
| 62 | * An implementation of the model <b>Package</b>. |
| 63 | * <!-- end-user-doc --> |
| 64 | * @generated |
| 65 | */ |
| 66 | public class QMLDeclarationsPackageImpl extends EPackageImpl implements QMLDeclarationsPackage { |
| 67 | /** |
| 68 | * <!-- begin-user-doc --> |
| 69 | * <!-- end-user-doc --> |
| 70 | * @generated |
| 71 | */ |
| 72 | private EClass qmlDeclarationsEClass = null; |
| 73 | |
| 74 | /** |
| 75 | * <!-- begin-user-doc --> |
| 76 | * <!-- end-user-doc --> |
| 77 | * @generated |
| 78 | */ |
| 79 | private EClass qmlDeclarationEClass = null; |
| 80 | |
| 81 | /** |
| 82 | * Creates an instance of the model <b>Package</b>, registered with |
| 83 | * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package |
| 84 | * package URI value. |
| 85 | * <p>Note: the correct way to create the package is via the static |
| 86 | * factory method {@link #init init()}, which also performs |
| 87 | * initialization of the package, or returns the registered package, |
| 88 | * if one already exists. |
| 89 | * <!-- begin-user-doc --> |
| 90 | * <!-- end-user-doc --> |
| 91 | * @see org.eclipse.emf.ecore.EPackage.Registry |
| 92 | * @see de.uka.ipd.sdq.dsexplore.qml.declarations.QMLDeclarations.QMLDeclarationsPackage#eNS_URI |
| 93 | * @see #init() |
| 94 | * @generated |
| 95 | */ |
| 96 | private QMLDeclarationsPackageImpl() { |
| 97 | super(eNS_URI, QMLDeclarationsFactory.eINSTANCE); |
| 98 | } |
| 99 | |
| 100 | /** |
| 101 | * <!-- begin-user-doc --> |
| 102 | * <!-- end-user-doc --> |
| 103 | * @generated |
| 104 | */ |
| 105 | private static boolean isInited = false; |
| 106 | |
| 107 | /** |
| 108 | * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends. |
| 109 | * |
| 110 | * <p>This method is used to initialize {@link QMLDeclarationsPackage#eINSTANCE} when that field is accessed. |
| 111 | * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. |
| 112 | * <!-- begin-user-doc --> |
| 113 | * <!-- end-user-doc --> |
| 114 | * @see #eNS_URI |
| 115 | * @see #createPackageContents() |
| 116 | * @see #initializePackageContents() |
| 117 | * @generated |
| 118 | */ |
| 119 | public static QMLDeclarationsPackage init() { |
| 120 | if (isInited) return (QMLDeclarationsPackage)EPackage.Registry.INSTANCE.getEPackage(QMLDeclarationsPackage.eNS_URI); |
| 121 | |
| 122 | // Obtain or create and register package |
| 123 | QMLDeclarationsPackageImpl theQMLDeclarationsPackage = (QMLDeclarationsPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof QMLDeclarationsPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new QMLDeclarationsPackageImpl()); |
| 124 | |
| 125 | isInited = true; |
| 126 | |
| 127 | // Initialize simple dependencies |
| 128 | CorePackage.eINSTANCE.eClass(); |
| 129 | UsagemodelPackage.eINSTANCE.eClass(); |
| 130 | RepositoryPackage.eINSTANCE.eClass(); |
| 131 | ProtocolPackage.eINSTANCE.eClass(); |
| 132 | ParameterPackage.eINSTANCE.eClass(); |
| 133 | SeffPackage.eINSTANCE.eClass(); |
| 134 | ResourcetypePackage.eINSTANCE.eClass(); |
| 135 | QosannotationsPackage.eINSTANCE.eClass(); |
| 136 | SystemPackage.eINSTANCE.eClass(); |
| 137 | ResourceenvironmentPackage.eINSTANCE.eClass(); |
| 138 | AllocationPackage.eINSTANCE.eClass(); |
| 139 | SubsystemPackage.eINSTANCE.eClass(); |
| 140 | |
| 141 | // Obtain or create and register interdependencies |
| 142 | QMLProfilePackageImpl theQMLProfilePackage = (QMLProfilePackageImpl)(EPackage.Registry.INSTANCE.getEPackage(QMLProfilePackage.eNS_URI) instanceof QMLProfilePackageImpl ? EPackage.Registry.INSTANCE.getEPackage(QMLProfilePackage.eNS_URI) : QMLProfilePackage.eINSTANCE); |
| 143 | QMLContractPackageImpl theQMLContractPackage = (QMLContractPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(QMLContractPackage.eNS_URI) instanceof QMLContractPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(QMLContractPackage.eNS_URI) : QMLContractPackage.eINSTANCE); |
| 144 | QMLContractTypePackageImpl theQMLContractTypePackage = (QMLContractTypePackageImpl)(EPackage.Registry.INSTANCE.getEPackage(QMLContractTypePackage.eNS_URI) instanceof QMLContractTypePackageImpl ? EPackage.Registry.INSTANCE.getEPackage(QMLContractTypePackage.eNS_URI) : QMLContractTypePackage.eINSTANCE); |
| 145 | |
| 146 | // Create package meta-data objects |
| 147 | theQMLDeclarationsPackage.createPackageContents(); |
| 148 | theQMLProfilePackage.createPackageContents(); |
| 149 | theQMLContractPackage.createPackageContents(); |
| 150 | theQMLContractTypePackage.createPackageContents(); |
| 151 | |
| 152 | // Initialize created meta-data |
| 153 | theQMLDeclarationsPackage.initializePackageContents(); |
| 154 | theQMLProfilePackage.initializePackageContents(); |
| 155 | theQMLContractPackage.initializePackageContents(); |
| 156 | theQMLContractTypePackage.initializePackageContents(); |
| 157 | |
| 158 | // Mark meta-data to indicate it can't be changed |
| 159 | theQMLDeclarationsPackage.freeze(); |
| 160 | |
| 161 | |
| 162 | // Update the registry and return the package |
| 163 | EPackage.Registry.INSTANCE.put(QMLDeclarationsPackage.eNS_URI, theQMLDeclarationsPackage); |
| 164 | return theQMLDeclarationsPackage; |
| 165 | } |
| 166 | |
| 167 | /** |
| 168 | * <!-- begin-user-doc --> |
| 169 | * <!-- end-user-doc --> |
| 170 | * @generated |
| 171 | */ |
| 172 | public EClass getQMLDeclarations() { |
| 173 | return qmlDeclarationsEClass; |
| 174 | } |
| 175 | |
| 176 | /** |
| 177 | * <!-- begin-user-doc --> |
| 178 | * <!-- end-user-doc --> |
| 179 | * @generated |
| 180 | */ |
| 181 | public EReference getQMLDeclarations_QmlDeclarations() { |
| 182 | return (EReference)qmlDeclarationsEClass.getEStructuralFeatures().get(0); |
| 183 | } |
| 184 | |
| 185 | /** |
| 186 | * <!-- begin-user-doc --> |
| 187 | * <!-- end-user-doc --> |
| 188 | * @generated |
| 189 | */ |
| 190 | public EClass getQMLDeclaration() { |
| 191 | return qmlDeclarationEClass; |
| 192 | } |
| 193 | |
| 194 | /** |
| 195 | * <!-- begin-user-doc --> |
| 196 | * <!-- end-user-doc --> |
| 197 | * @generated |
| 198 | */ |
| 199 | public QMLDeclarationsFactory getQMLDeclarationsFactory() { |
| 200 | return (QMLDeclarationsFactory)getEFactoryInstance(); |
| 201 | } |
| 202 | |
| 203 | /** |
| 204 | * <!-- begin-user-doc --> |
| 205 | * <!-- end-user-doc --> |
| 206 | * @generated |
| 207 | */ |
| 208 | private boolean isCreated = false; |
| 209 | |
| 210 | /** |
| 211 | * Creates the meta-model objects for the package. This method is |
| 212 | * guarded to have no affect on any invocation but its first. |
| 213 | * <!-- begin-user-doc --> |
| 214 | * <!-- end-user-doc --> |
| 215 | * @generated |
| 216 | */ |
| 217 | public void createPackageContents() { |
| 218 | if (isCreated) return; |
| 219 | isCreated = true; |
| 220 | |
| 221 | // Create classes and their features |
| 222 | qmlDeclarationsEClass = createEClass(QML_DECLARATIONS); |
| 223 | createEReference(qmlDeclarationsEClass, QML_DECLARATIONS__QML_DECLARATIONS); |
| 224 | |
| 225 | qmlDeclarationEClass = createEClass(QML_DECLARATION); |
| 226 | } |
| 227 | |
| 228 | /** |
| 229 | * <!-- begin-user-doc --> |
| 230 | * <!-- end-user-doc --> |
| 231 | * @generated |
| 232 | */ |
| 233 | private boolean isInitialized = false; |
| 234 | |
| 235 | /** |
| 236 | * Complete the initialization of the package and its meta-model. This |
| 237 | * method is guarded to have no affect on any invocation but its first. |
| 238 | * <!-- begin-user-doc --> |
| 239 | * <!-- end-user-doc --> |
| 240 | * @generated |
| 241 | */ |
| 242 | public void initializePackageContents() { |
| 243 | if (isInitialized) return; |
| 244 | isInitialized = true; |
| 245 | |
| 246 | // Initialize package |
| 247 | setName(eNAME); |
| 248 | setNsPrefix(eNS_PREFIX); |
| 249 | setNsURI(eNS_URI); |
| 250 | |
| 251 | // Obtain other dependent packages |
| 252 | IdentifierPackage theIdentifierPackage = (IdentifierPackage)EPackage.Registry.INSTANCE.getEPackage(IdentifierPackage.eNS_URI); |
| 253 | EntityPackage theEntityPackage = (EntityPackage)EPackage.Registry.INSTANCE.getEPackage(EntityPackage.eNS_URI); |
| 254 | |
| 255 | // Create type parameters |
| 256 | |
| 257 | // Set bounds for type parameters |
| 258 | |
| 259 | // Add supertypes to classes |
| 260 | qmlDeclarationsEClass.getESuperTypes().add(theIdentifierPackage.getIdentifier()); |
| 261 | qmlDeclarationEClass.getESuperTypes().add(theEntityPackage.getEntity()); |
| 262 | |
| 263 | // Initialize classes and features; add operations and parameters |
| 264 | initEClass(qmlDeclarationsEClass, QMLDeclarations.class, "QMLDeclarations", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); |
| 265 | initEReference(getQMLDeclarations_QmlDeclarations(), this.getQMLDeclaration(), null, "qmlDeclarations", null, 0, -1, QMLDeclarations.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); |
| 266 | |
| 267 | initEClass(qmlDeclarationEClass, QMLDeclaration.class, "QMLDeclaration", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); |
| 268 | |
| 269 | // Create resource |
| 270 | createResource(eNS_URI); |
| 271 | } |
| 272 | |
| 273 | } //QMLDeclarationsPackageImpl |