Skip to content

Package: VGroupedGridFactoryImpl

VGroupedGridFactoryImpl

nameinstructionbranchcomplexitylinemethod
VGroupedGridFactoryImpl()
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: 14 C: 15
52%
M: 1 C: 4
80%
M: 1 C: 4
80%
M: 1 C: 5
83%
M: 0 C: 1
100%
createGroup()
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%
createGroupedGrid()
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%
createRow()
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%
createSpan()
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%
getGroupedGridPackage()
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-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: * Eugen Neufeld - initial API and implementation
13: */
14: package org.eclipse.emf.ecp.view.spi.groupedgrid.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.groupedgrid.model.VGroup;
22: import org.eclipse.emf.ecp.view.spi.groupedgrid.model.VGroupedGrid;
23: import org.eclipse.emf.ecp.view.spi.groupedgrid.model.VGroupedGridFactory;
24: import org.eclipse.emf.ecp.view.spi.groupedgrid.model.VGroupedGridPackage;
25: import org.eclipse.emf.ecp.view.spi.groupedgrid.model.VRow;
26: import org.eclipse.emf.ecp.view.spi.groupedgrid.model.VSpan;
27:
28: /**
29: * <!-- begin-user-doc -->
30: * An implementation of the model <b>Factory</b>.
31: * <!-- end-user-doc -->
32: *
33: * @generated
34: * @since 1.2
35: */
36: public class VGroupedGridFactoryImpl extends EFactoryImpl implements VGroupedGridFactory {
37:         /**
38:          * Creates the default factory implementation.
39:          * <!-- begin-user-doc -->
40:          * <!-- end-user-doc -->
41:          *
42:          * @generated
43:          */
44:         public static VGroupedGridFactory init() {
45:                 try {
46:                         final VGroupedGridFactory theGroupedGridFactory = (VGroupedGridFactory) EPackage.Registry.INSTANCE
47:                                 .getEFactory(VGroupedGridPackage.eNS_URI);
48:•                        if (theGroupedGridFactory != null) {
49:                                 return theGroupedGridFactory;
50:                         }
51:                 } catch (final Exception exception) {
52:                         EcorePlugin.INSTANCE.log(exception);
53:                 }
54:                 return new VGroupedGridFactoryImpl();
55:         }
56:
57:         /**
58:          * Creates an instance of the factory.
59:          * <!-- begin-user-doc -->
60:          * <!-- end-user-doc -->
61:          *
62:          * @generated
63:          */
64:         public VGroupedGridFactoryImpl() {
65:                 super();
66:         }
67:
68:         /**
69:          * <!-- begin-user-doc -->
70:          * <!-- end-user-doc -->
71:          *
72:          * @generated
73:          */
74:         @Override
75:         public EObject create(EClass eClass) {
76:•                switch (eClass.getClassifierID()) {
77:                 case VGroupedGridPackage.GROUPED_GRID:
78:                         return createGroupedGrid();
79:                 case VGroupedGridPackage.GROUP:
80:                         return createGroup();
81:                 case VGroupedGridPackage.ROW:
82:                         return createRow();
83:                 case VGroupedGridPackage.SPAN:
84:                         return createSpan();
85:                 default:
86:                         throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); //$NON-NLS-1$ //$NON-NLS-2$
87:                 }
88:         }
89:
90:         /**
91:          * <!-- begin-user-doc -->
92:          * <!-- end-user-doc -->
93:          *
94:          * @generated
95:          */
96:         @Override
97:         public VGroupedGrid createGroupedGrid() {
98:                 final VGroupedGridImpl groupedGrid = new VGroupedGridImpl();
99:                 return groupedGrid;
100:         }
101:
102:         /**
103:          * <!-- begin-user-doc -->
104:          * <!-- end-user-doc -->
105:          *
106:          * @generated
107:          */
108:         @Override
109:         public VGroup createGroup() {
110:                 final VGroupImpl group = new VGroupImpl();
111:                 return group;
112:         }
113:
114:         /**
115:          * <!-- begin-user-doc -->
116:          * <!-- end-user-doc -->
117:          *
118:          * @generated
119:          */
120:         @Override
121:         public VRow createRow() {
122:                 final VRowImpl row = new VRowImpl();
123:                 return row;
124:         }
125:
126:         /**
127:          * <!-- begin-user-doc -->
128:          * <!-- end-user-doc -->
129:          *
130:          * @generated
131:          */
132:         @Override
133:         public VSpan createSpan() {
134:                 final VSpanImpl span = new VSpanImpl();
135:                 return span;
136:         }
137:
138:         /**
139:          * <!-- begin-user-doc -->
140:          * <!-- end-user-doc -->
141:          *
142:          * @generated
143:          */
144:         @Override
145:         public VGroupedGridPackage getGroupedGridPackage() {
146:                 return (VGroupedGridPackage) getEPackage();
147:         }
148:
149:         /**
150:          * <!-- begin-user-doc -->
151:          * <!-- end-user-doc -->
152:          *
153:          * @deprecated
154:          * @generated
155:          */
156:         @Deprecated
157:         public static VGroupedGridPackage getPackage() {
158:                 return VGroupedGridPackage.eINSTANCE;
159:         }
160:
161: } // VGroupedGridFactoryImpl