Skip to content

Package: VCategorizationFactoryImpl

VCategorizationFactoryImpl

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