Skip to content

Package: EdaptTestZFactoryImpl

EdaptTestZFactoryImpl

nameinstructionbranchcomplexitylinemethod
EdaptTestZFactoryImpl()
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: 3 C: 0
0%
M: 1 C: 0
0%
createZ()
M: 6 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 2 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%
getZPackage()
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%
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-2013 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: */
13: package org.eclipse.emf.ecp.view.edapt.util.test.model.z.impl;
14:
15: import org.eclipse.emf.ecore.EClass;
16: import org.eclipse.emf.ecore.EObject;
17: import org.eclipse.emf.ecore.EPackage;
18: import org.eclipse.emf.ecore.impl.EFactoryImpl;
19: import org.eclipse.emf.ecore.plugin.EcorePlugin;
20: import org.eclipse.emf.ecp.view.edapt.util.test.model.z.EdaptTestZ;
21: import org.eclipse.emf.ecp.view.edapt.util.test.model.z.EdaptTestZFactory;
22: import org.eclipse.emf.ecp.view.edapt.util.test.model.z.EdaptTestZPackage;
23:
24: /**
25: * <!-- begin-user-doc -->
26: * An implementation of the model <b>Factory</b>.
27: * <!-- end-user-doc -->
28: *
29: * @generated
30: */
31: public class EdaptTestZFactoryImpl extends EFactoryImpl implements EdaptTestZFactory {
32:         /**
33:          * Creates the default factory implementation.
34:          * <!-- begin-user-doc -->
35:          * <!-- end-user-doc -->
36:          *
37:          * @generated
38:          */
39:         public static EdaptTestZFactory init() {
40:                 try {
41:                         final EdaptTestZFactory theZFactory = (EdaptTestZFactory) EPackage.Registry.INSTANCE
42:                                 .getEFactory(EdaptTestZPackage.eNS_URI);
43:•                        if (theZFactory != null) {
44:                                 return theZFactory;
45:                         }
46:                 } catch (final Exception exception) {
47:                         EcorePlugin.INSTANCE.log(exception);
48:                 }
49:                 return new EdaptTestZFactoryImpl();
50:         }
51:
52:         /**
53:          * Creates an instance of the factory.
54:          * <!-- begin-user-doc -->
55:          * <!-- end-user-doc -->
56:          *
57:          * @generated
58:          */
59:         public EdaptTestZFactoryImpl() {
60:                 super();
61:         }
62:
63:         /**
64:          * <!-- begin-user-doc -->
65:          * <!-- end-user-doc -->
66:          *
67:          * @generated
68:          */
69:         @Override
70:         public EObject create(EClass eClass) {
71:•                switch (eClass.getClassifierID()) {
72:                 case EdaptTestZPackage.Z:
73:                         return createZ();
74:                 default:
75:                         throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
76:                 }
77:         }
78:
79:         /**
80:          * <!-- begin-user-doc -->
81:          * <!-- end-user-doc -->
82:          *
83:          * @generated
84:          */
85:         @Override
86:         public EdaptTestZ createZ() {
87:                 final EdaptTestZImpl z = new EdaptTestZImpl();
88:                 return z;
89:         }
90:
91:         /**
92:          * <!-- begin-user-doc -->
93:          * <!-- end-user-doc -->
94:          *
95:          * @generated
96:          */
97:         @Override
98:         public EdaptTestZPackage getZPackage() {
99:                 return (EdaptTestZPackage) getEPackage();
100:         }
101:
102:         /**
103:          * <!-- begin-user-doc -->
104:          * <!-- end-user-doc -->
105:          *
106:          * @deprecated
107:          * @generated
108:          */
109:         @Deprecated
110:         public static EdaptTestZPackage getPackage() {
111:                 return EdaptTestZPackage.eINSTANCE;
112:         }
113:
114: } // EdaptTestZFactoryImpl