Skip to content

Package: VMappingdmrFactoryImpl

VMappingdmrFactoryImpl

nameinstructionbranchcomplexitylinemethod
VMappingdmrFactoryImpl()
M: 0 C: 3
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 2
100%
M: 0 C: 1
100%
create(EClass)
M: 20 C: 0
0%
M: 2 C: 0
0%
M: 2 C: 0
0%
M: 4 C: 0
0%
M: 1 C: 0
0%
createMappingDomainModelReference()
M: 0 C: 6
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 2
100%
M: 0 C: 1
100%
getMappingdmrPackage()
M: 4 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
getPackage()
M: 2 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
init()
M: 6 C: 11
65%
M: 1 C: 1
50%
M: 1 C: 1
50%
M: 3 C: 4
57%
M: 0 C: 1
100%

Coverage

1: /**
2: * Copyright (c) 2011-2014 EclipseSource Muenchen GmbH and others.
3: *
4: * All rights reserved. This program and the accompanying materials
5: * are made available under the terms of the Eclipse Public License 2.0
6: * which accompanies this distribution, and is available at
7: * https://www.eclipse.org/legal/epl-2.0/
8: *
9: * SPDX-License-Identifier: EPL-2.0
10: *
11: * Contributors:
12: * Eugen Neufeld - initial API and implementation
13: */
14: package org.eclipse.emf.ecp.view.spi.mappingdmr.model.impl;
15:
16: import org.eclipse.emf.ecore.EClass;
17: import org.eclipse.emf.ecore.EObject;
18: import org.eclipse.emf.ecore.EPackage;
19: import org.eclipse.emf.ecore.impl.EFactoryImpl;
20: import org.eclipse.emf.ecore.plugin.EcorePlugin;
21: import org.eclipse.emf.ecp.view.spi.mappingdmr.model.VMappingDomainModelReference;
22: import org.eclipse.emf.ecp.view.spi.mappingdmr.model.VMappingdmrFactory;
23: import org.eclipse.emf.ecp.view.spi.mappingdmr.model.VMappingdmrPackage;
24:
25: /**
26: * <!-- begin-user-doc --> An implementation of the model <b>Factory</b>. <!--
27: * end-user-doc -->
28: *
29: * @generated
30: */
31: public class VMappingdmrFactoryImpl extends EFactoryImpl implements
32:         VMappingdmrFactory {
33:         /**
34:          * Creates the default factory implementation. <!-- begin-user-doc --> <!--
35:          * end-user-doc -->
36:          *
37:          * @generated
38:          */
39:         public static VMappingdmrFactory init() {
40:                 try {
41:                         final VMappingdmrFactory theMappingdmrFactory = (VMappingdmrFactory) EPackage.Registry.INSTANCE
42:                                 .getEFactory(VMappingdmrPackage.eNS_URI);
43:•                        if (theMappingdmrFactory != null) {
44:                                 return theMappingdmrFactory;
45:                         }
46:                 } catch (final Exception exception) {
47:                         EcorePlugin.INSTANCE.log(exception);
48:                 }
49:                 return new VMappingdmrFactoryImpl();
50:         }
51:
52:         /**
53:          * Creates an instance of the factory. <!-- begin-user-doc --> <!--
54:          * end-user-doc -->
55:          *
56:          * @generated
57:          */
58:         public VMappingdmrFactoryImpl() {
59:                 super();
60:         }
61:
62:         /**
63:          * <!-- begin-user-doc --> <!-- end-user-doc -->
64:          *
65:          * @generated
66:          */
67:         @Override
68:         public EObject create(EClass eClass) {
69:•                switch (eClass.getClassifierID()) {
70:                 case VMappingdmrPackage.MAPPING_DOMAIN_MODEL_REFERENCE:
71:                         return createMappingDomainModelReference();
72:                 default:
73:                         throw new IllegalArgumentException(
74:                                 "The class '" + eClass.getName() + "' is not a valid classifier"); //$NON-NLS-1$ //$NON-NLS-2$
75:                 }
76:         }
77:
78:         /**
79:          * <!-- begin-user-doc --> <!-- end-user-doc -->
80:          *
81:          * @generated
82:          */
83:         @Override
84:         public VMappingDomainModelReference createMappingDomainModelReference() {
85:                 final VMappingDomainModelReferenceImpl mappingDomainModelReference = new VMappingDomainModelReferenceImpl();
86:                 return mappingDomainModelReference;
87:         }
88:
89:         /**
90:          * <!-- begin-user-doc --> <!-- end-user-doc -->
91:          *
92:          * @generated
93:          */
94:         @Override
95:         public VMappingdmrPackage getMappingdmrPackage() {
96:                 return (VMappingdmrPackage) getEPackage();
97:         }
98:
99:         /**
100:          * <!-- begin-user-doc --> <!-- end-user-doc -->
101:          *
102:          * @deprecated
103:          * @generated
104:          */
105:         @Deprecated
106:         public static VMappingdmrPackage getPackage() {
107:                 return VMappingdmrPackage.eINSTANCE;
108:         }
109:
110: } // VMappingdmrFactoryImpl