Skip to content

Package: VVerticalFactoryImpl

VVerticalFactoryImpl

nameinstructionbranchcomplexitylinemethod
VVerticalFactoryImpl()
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: 6
30%
M: 1 C: 1
50%
M: 1 C: 1
50%
M: 1 C: 2
67%
M: 0 C: 1
100%
createVerticalLayout()
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%
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%
getVerticalPackage()
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: * Eugen Neufeld - initial API and implementation
13: */
14: package org.eclipse.emf.ecp.view.spi.vertical.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.vertical.model.VVerticalFactory;
22: import org.eclipse.emf.ecp.view.spi.vertical.model.VVerticalLayout;
23: import org.eclipse.emf.ecp.view.spi.vertical.model.VVerticalPackage;
24:
25: /**
26: * <!-- begin-user-doc -->
27: * An implementation of the model <b>Factory</b>.
28: *
29: * @since 1.2
30: * <!-- end-user-doc -->
31: *
32: * @generated
33: */
34: public class VVerticalFactoryImpl extends EFactoryImpl implements VVerticalFactory {
35:         /**
36:          * Creates the default factory implementation.
37:          * <!-- begin-user-doc -->
38:          * <!-- end-user-doc -->
39:          *
40:          * @generated
41:          */
42:         public static VVerticalFactory init() {
43:                 try {
44:                         final VVerticalFactory theVerticalFactory = (VVerticalFactory) EPackage.Registry.INSTANCE
45:                                 .getEFactory(VVerticalPackage.eNS_URI);
46:•                        if (theVerticalFactory != null) {
47:                                 return theVerticalFactory;
48:                         }
49:                 } catch (final Exception exception) {
50:                         EcorePlugin.INSTANCE.log(exception);
51:                 }
52:                 return new VVerticalFactoryImpl();
53:         }
54:
55:         /**
56:          * Creates an instance of the factory.
57:          * <!-- begin-user-doc -->
58:          * <!-- end-user-doc -->
59:          *
60:          * @generated
61:          */
62:         public VVerticalFactoryImpl() {
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 VVerticalPackage.VERTICAL_LAYOUT:
76:                         return createVerticalLayout();
77:                 default:
78:                         throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); //$NON-NLS-1$ //$NON-NLS-2$
79:                 }
80:         }
81:
82:         /**
83:          * <!-- begin-user-doc -->
84:          * <!-- end-user-doc -->
85:          *
86:          * @generated
87:          */
88:         @Override
89:         public VVerticalLayout createVerticalLayout() {
90:                 final VVerticalLayoutImpl verticalLayout = new VVerticalLayoutImpl();
91:                 return verticalLayout;
92:         }
93:
94:         /**
95:          * <!-- begin-user-doc -->
96:          * <!-- end-user-doc -->
97:          *
98:          * @generated
99:          */
100:         @Override
101:         public VVerticalPackage getVerticalPackage() {
102:                 return (VVerticalPackage) getEPackage();
103:         }
104:
105:         /**
106:          * <!-- begin-user-doc -->
107:          * <!-- end-user-doc -->
108:          *
109:          * @deprecated
110:          * @generated
111:          */
112:         @Deprecated
113:         public static VVerticalPackage getPackage() {
114:                 return VVerticalPackage.eINSTANCE;
115:         }
116:
117: } // VVerticalFactoryImpl