Skip to content

Package: VControlgridFactoryImpl

VControlgridFactoryImpl

nameinstructionbranchcomplexitylinemethod
VControlgridFactoryImpl()
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: 26 C: 0
0%
M: 4 C: 0
0%
M: 4 C: 0
0%
M: 5 C: 0
0%
M: 1 C: 0
0%
createControlGrid()
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%
createControlGridCell()
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%
createControlGridRow()
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%
getControlgridPackage()
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-2015 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: * Johannes Faltermeier - initial API and implementation
13: */
14: package org.eclipse.emf.emfforms.spi.view.controlgrid.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.emfforms.spi.view.controlgrid.model.VControlGrid;
22: import org.eclipse.emf.emfforms.spi.view.controlgrid.model.VControlGridCell;
23: import org.eclipse.emf.emfforms.spi.view.controlgrid.model.VControlGridRow;
24: import org.eclipse.emf.emfforms.spi.view.controlgrid.model.VControlgridFactory;
25: import org.eclipse.emf.emfforms.spi.view.controlgrid.model.VControlgridPackage;
26:
27: /**
28: * <!-- begin-user-doc -->
29: * An implementation of the model <b>Factory</b>.
30: * <!-- end-user-doc -->
31: *
32: * @generated
33: */
34: public class VControlgridFactoryImpl extends EFactoryImpl implements VControlgridFactory {
35:         /**
36:          * Creates the default factory implementation.
37:          * <!-- begin-user-doc -->
38:          * <!-- end-user-doc -->
39:          *
40:          * @generated
41:          */
42:         public static VControlgridFactory init() {
43:                 try {
44:                         final VControlgridFactory theControlgridFactory = (VControlgridFactory) EPackage.Registry.INSTANCE
45:                                 .getEFactory(VControlgridPackage.eNS_URI);
46:•                        if (theControlgridFactory != null) {
47:                                 return theControlgridFactory;
48:                         }
49:                 } catch (final Exception exception) {
50:                         EcorePlugin.INSTANCE.log(exception);
51:                 }
52:                 return new VControlgridFactoryImpl();
53:         }
54:
55:         /**
56:          * Creates an instance of the factory.
57:          * <!-- begin-user-doc -->
58:          * <!-- end-user-doc -->
59:          *
60:          * @generated
61:          */
62:         public VControlgridFactoryImpl() {
63:                 super();
64:         }
65:
66:         /**
67:          * <!-- begin-user-doc -->
68:          * <!-- end-user-doc -->
69:          *
70:          * @generated
71:          */
72:         @Override
73:         public EObject create(EClass eClass) {
74:•                switch (eClass.getClassifierID()) {
75:                 case VControlgridPackage.CONTROL_GRID:
76:                         return createControlGrid();
77:                 case VControlgridPackage.CONTROL_GRID_ROW:
78:                         return createControlGridRow();
79:                 case VControlgridPackage.CONTROL_GRID_CELL:
80:                         return createControlGridCell();
81:                 default:
82:                         throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); //$NON-NLS-1$ //$NON-NLS-2$
83:                 }
84:         }
85:
86:         /**
87:          * <!-- begin-user-doc -->
88:          * <!-- end-user-doc -->
89:          *
90:          * @generated
91:          */
92:         @Override
93:         public VControlGrid createControlGrid() {
94:                 final VControlGridImpl controlGrid = new VControlGridImpl();
95:                 return controlGrid;
96:         }
97:
98:         /**
99:          * <!-- begin-user-doc -->
100:          * <!-- end-user-doc -->
101:          *
102:          * @generated
103:          */
104:         @Override
105:         public VControlGridRow createControlGridRow() {
106:                 final VControlGridRowImpl controlGridRow = new VControlGridRowImpl();
107:                 return controlGridRow;
108:         }
109:
110:         /**
111:          * <!-- begin-user-doc -->
112:          * <!-- end-user-doc -->
113:          *
114:          * @generated
115:          */
116:         @Override
117:         public VControlGridCell createControlGridCell() {
118:                 final VControlGridCellImpl controlGridCell = new VControlGridCellImpl();
119:                 return controlGridCell;
120:         }
121:
122:         /**
123:          * <!-- begin-user-doc -->
124:          * <!-- end-user-doc -->
125:          *
126:          * @generated
127:          */
128:         @Override
129:         public VControlgridPackage getControlgridPackage() {
130:                 return (VControlgridPackage) getEPackage();
131:         }
132:
133:         /**
134:          * <!-- begin-user-doc -->
135:          * <!-- end-user-doc -->
136:          *
137:          * @deprecated
138:          * @generated
139:          */
140:         @Deprecated
141:         public static VControlgridPackage getPackage() {
142:                 return VControlgridPackage.eINSTANCE;
143:         }
144:
145: } // VControlgridFactoryImpl