| /**
|
| * Copyright (c) 2011, 2019 Mia-Software and others.
|
| * All rights reserved. This program and the accompanying materials
|
| * are made available under the terms of the Eclipse Public License v2.0
|
| * which accompanies this distribution, and is available at
|
| * http://www.eclipse.org/legal/epl-v20.html
|
| *
|
| * Contributors:
|
| * Gabriel Barbier (Mia-Software) - initial API and implementation
|
| * Nicolas Bros (Mia-Software) - Bug 335003 - [Discoverer] : Existing Discoverers Refactoring based on new framework
|
| */ |
| package org.eclipse.modisco.usecase.modelfilter.methodcalls.methodcalls.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.eclipse.modisco.java.emf.JavaPackage;
|
| import org.eclipse.modisco.usecase.modelfilter.methodcalls.methodcalls.CallNode;
|
| import org.eclipse.modisco.usecase.modelfilter.methodcalls.methodcalls.CallsModel;
|
| import org.eclipse.modisco.usecase.modelfilter.methodcalls.methodcalls.MethodCall;
|
| import org.eclipse.modisco.usecase.modelfilter.methodcalls.methodcalls.MethodcallsFactory;
|
| import org.eclipse.modisco.usecase.modelfilter.methodcalls.methodcalls.MethodcallsPackage;
|
|
|
| /**
|
| * <!-- begin-user-doc -->
|
| * An implementation of the model <b>Package</b>.
|
| * <!-- end-user-doc -->
|
| * @generated
|
| */
|
| public class MethodcallsPackageImpl extends EPackageImpl implements MethodcallsPackage {
|
| /**
|
| * <!-- begin-user-doc -->
|
| * <!-- end-user-doc -->
|
| * @generated
|
| */
|
| private EClass methodCallEClass = null;
|
|
|
| /**
|
| * <!-- begin-user-doc -->
|
| * <!-- end-user-doc -->
|
| * @generated
|
| */
|
| private EClass callsModelEClass = null;
|
|
|
| /**
|
| * <!-- begin-user-doc -->
|
| * <!-- end-user-doc -->
|
| * @generated
|
| */
|
| private EClass callNodeEClass = 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.eclipse.modisco.usecase.modelfilter.methodcalls.methodcalls.MethodcallsPackage#eNS_URI
|
| * @see #init()
|
| * @generated
|
| */
|
| private MethodcallsPackageImpl() {
|
| super(eNS_URI, MethodcallsFactory.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.
|
| *
|
| * <p>This method is used to initialize {@link MethodcallsPackage#eINSTANCE} when that field is accessed.
|
| * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package.
|
| * <!-- begin-user-doc -->
|
| * <!-- end-user-doc -->
|
| * @see #eNS_URI
|
| * @see #createPackageContents()
|
| * @see #initializePackageContents()
|
| * @generated
|
| */
|
| public static MethodcallsPackage init() {
|
| if (isInited) return (MethodcallsPackage)EPackage.Registry.INSTANCE.getEPackage(MethodcallsPackage.eNS_URI);
|
|
|
| // Obtain or create and register package
|
| MethodcallsPackageImpl theMethodcallsPackage = (MethodcallsPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof MethodcallsPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new MethodcallsPackageImpl());
|
|
|
| isInited = true;
|
|
|
| // Initialize simple dependencies
|
| JavaPackage.eINSTANCE.eClass();
|
|
|
| // Create package meta-data objects
|
| theMethodcallsPackage.createPackageContents();
|
|
|
| // Initialize created meta-data
|
| theMethodcallsPackage.initializePackageContents();
|
|
|
| // Mark meta-data to indicate it can't be changed
|
| theMethodcallsPackage.freeze();
|
|
|
|
|
| // Update the registry and return the package
|
| EPackage.Registry.INSTANCE.put(MethodcallsPackage.eNS_URI, theMethodcallsPackage);
|
| return theMethodcallsPackage;
|
| }
|
|
|
| /**
|
| * <!-- begin-user-doc -->
|
| * <!-- end-user-doc -->
|
| * @generated
|
| */
|
| public EClass getMethodCall() {
|
| return methodCallEClass;
|
| }
|
|
|
| /**
|
| * <!-- begin-user-doc -->
|
| * <!-- end-user-doc -->
|
| * @generated
|
| */
|
| public EAttribute getMethodCall_Order() {
|
| return (EAttribute)methodCallEClass.getEStructuralFeatures().get(0);
|
| }
|
|
|
| /**
|
| * <!-- begin-user-doc -->
|
| * <!-- end-user-doc -->
|
| * @generated
|
| */
|
| public EReference getMethodCall_Parent() {
|
| return (EReference)methodCallEClass.getEStructuralFeatures().get(1);
|
| }
|
|
|
| /**
|
| * <!-- begin-user-doc -->
|
| * <!-- end-user-doc -->
|
| * @generated
|
| */
|
| public EReference getMethodCall_Callee() {
|
| return (EReference)methodCallEClass.getEStructuralFeatures().get(2);
|
| }
|
|
|
| /**
|
| * <!-- begin-user-doc -->
|
| * <!-- end-user-doc -->
|
| * @generated
|
| */
|
| public EReference getMethodCall_FilteredSubMethods() {
|
| return (EReference)methodCallEClass.getEStructuralFeatures().get(3);
|
| }
|
|
|
| /**
|
| * <!-- begin-user-doc -->
|
| * <!-- end-user-doc -->
|
| * @generated
|
| */
|
| public EClass getCallsModel() {
|
| return callsModelEClass;
|
| }
|
|
|
| /**
|
| * <!-- begin-user-doc -->
|
| * <!-- end-user-doc -->
|
| * @generated
|
| */
|
| public EReference getCallsModel_CallNodes() {
|
| return (EReference)callsModelEClass.getEStructuralFeatures().get(0);
|
| }
|
|
|
| /**
|
| * <!-- begin-user-doc -->
|
| * <!-- end-user-doc -->
|
| * @generated
|
| */
|
| public EReference getCallsModel_RootNodes() {
|
| return (EReference)callsModelEClass.getEStructuralFeatures().get(1);
|
| }
|
|
|
| /**
|
| * <!-- begin-user-doc -->
|
| * <!-- end-user-doc -->
|
| * @generated
|
| */
|
| public EAttribute getCallsModel_Name() {
|
| return (EAttribute)callsModelEClass.getEStructuralFeatures().get(2);
|
| }
|
|
|
| /**
|
| * <!-- begin-user-doc -->
|
| * <!-- end-user-doc -->
|
| * @generated
|
| */
|
| public EClass getCallNode() {
|
| return callNodeEClass;
|
| }
|
|
|
| /**
|
| * <!-- begin-user-doc -->
|
| * <!-- end-user-doc -->
|
| * @generated
|
| */
|
| public EReference getCallNode_MethodCalls() {
|
| return (EReference)callNodeEClass.getEStructuralFeatures().get(0);
|
| }
|
|
|
| /**
|
| * <!-- begin-user-doc -->
|
| * <!-- end-user-doc -->
|
| * @generated
|
| */
|
| public EReference getCallNode_SubMethods() {
|
| return (EReference)callNodeEClass.getEStructuralFeatures().get(1);
|
| }
|
|
|
| /**
|
| * <!-- begin-user-doc -->
|
| * <!-- end-user-doc -->
|
| * @generated
|
| */
|
| public EReference getCallNode_JavaMethod() {
|
| return (EReference)callNodeEClass.getEStructuralFeatures().get(2);
|
| }
|
|
|
| /**
|
| * <!-- begin-user-doc -->
|
| * <!-- end-user-doc -->
|
| * @generated
|
| */
|
| public EAttribute getCallNode_Name() {
|
| return (EAttribute)callNodeEClass.getEStructuralFeatures().get(3);
|
| }
|
|
|
| /**
|
| * <!-- begin-user-doc -->
|
| * <!-- end-user-doc -->
|
| * @generated
|
| */
|
| public MethodcallsFactory getMethodcallsFactory() {
|
| return (MethodcallsFactory)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
|
| methodCallEClass = createEClass(METHOD_CALL);
|
| createEAttribute(methodCallEClass, METHOD_CALL__ORDER);
|
| createEReference(methodCallEClass, METHOD_CALL__PARENT);
|
| createEReference(methodCallEClass, METHOD_CALL__CALLEE);
|
| createEReference(methodCallEClass, METHOD_CALL__FILTERED_SUB_METHODS);
|
|
|
| callsModelEClass = createEClass(CALLS_MODEL);
|
| createEReference(callsModelEClass, CALLS_MODEL__CALL_NODES);
|
| createEReference(callsModelEClass, CALLS_MODEL__ROOT_NODES);
|
| createEAttribute(callsModelEClass, CALLS_MODEL__NAME);
|
|
|
| callNodeEClass = createEClass(CALL_NODE);
|
| createEReference(callNodeEClass, CALL_NODE__METHOD_CALLS);
|
| createEReference(callNodeEClass, CALL_NODE__SUB_METHODS);
|
| createEReference(callNodeEClass, CALL_NODE__JAVA_METHOD);
|
| createEAttribute(callNodeEClass, CALL_NODE__NAME);
|
| }
|
|
|
| /**
|
| * <!-- 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);
|
|
|
| // Obtain other dependent packages
|
| JavaPackage theJavaPackage = (JavaPackage)EPackage.Registry.INSTANCE.getEPackage(JavaPackage.eNS_URI);
|
|
|
| // Create type parameters
|
|
|
| // Set bounds for type parameters
|
|
|
| // Add supertypes to classes
|
|
|
| // Initialize classes and features; add operations and parameters
|
| initEClass(methodCallEClass, MethodCall.class, "MethodCall", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
|
| initEAttribute(getMethodCall_Order(), ecorePackage.getEInt(), "order", null, 0, 1, MethodCall.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
|
| initEReference(getMethodCall_Parent(), this.getCallNode(), this.getCallNode_MethodCalls(), "parent", null, 1, 1, MethodCall.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
|
| initEReference(getMethodCall_Callee(), this.getCallNode(), null, "callee", null, 1, 1, MethodCall.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
|
| initEReference(getMethodCall_FilteredSubMethods(), this.getCallNode(), null, "filteredSubMethods", null, 0, -1, MethodCall.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
|
|
|
| initEClass(callsModelEClass, CallsModel.class, "CallsModel", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
|
| initEReference(getCallsModel_CallNodes(), this.getCallNode(), null, "callNodes", null, 0, -1, CallsModel.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
|
| initEReference(getCallsModel_RootNodes(), this.getCallNode(), null, "rootNodes", null, 0, -1, CallsModel.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED);
|
| initEAttribute(getCallsModel_Name(), ecorePackage.getEString(), "name", null, 0, 1, CallsModel.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
|
|
|
| initEClass(callNodeEClass, CallNode.class, "CallNode", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
|
| initEReference(getCallNode_MethodCalls(), this.getMethodCall(), this.getMethodCall_Parent(), "methodCalls", null, 0, -1, CallNode.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
|
| initEReference(getCallNode_SubMethods(), this.getCallNode(), null, "subMethods", null, 0, -1, CallNode.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
|
| initEReference(getCallNode_JavaMethod(), theJavaPackage.getAbstractMethodDeclaration(), null, "javaMethod", null, 1, 1, CallNode.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
|
| initEAttribute(getCallNode_Name(), ecorePackage.getEString(), "name", null, 0, 1, CallNode.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
|
|
|
| // Create resource
|
| createResource(eNS_URI);
|
| }
|
|
|
| } //MethodcallsPackageImpl
|