Skip to content

Package: KeyattributedmrSwitch

KeyattributedmrSwitch

nameinstructionbranchcomplexitylinemethod
KeyattributedmrSwitch()
M: 7 C: 0
0%
M: 2 C: 0
0%
M: 2 C: 0
0%
M: 4 C: 0
0%
M: 1 C: 0
0%
caseDomainModelReference(VDomainModelReference)
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%
caseFeaturePathDomainModelReference(VFeaturePathDomainModelReference)
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%
caseKeyAttributeDomainModelReference(VKeyAttributeDomainModelReference)
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%
defaultCase(EObject)
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%
doSwitch(int, EObject)
M: 33 C: 0
0%
M: 8 C: 0
0%
M: 5 C: 0
0%
M: 11 C: 0
0%
M: 1 C: 0
0%
isSwitchFor(EPackage)
M: 7 C: 0
0%
M: 2 C: 0
0%
M: 2 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%

Coverage

1: /**
2: * Copyright (c) 2011-2014 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.keyattributedmr.model.util;
15:
16: import org.eclipse.emf.ecore.EObject;
17: import org.eclipse.emf.ecore.EPackage;
18: import org.eclipse.emf.ecore.util.Switch;
19: import org.eclipse.emf.ecp.view.spi.keyattributedmr.model.VKeyAttributeDomainModelReference;
20: import org.eclipse.emf.ecp.view.spi.keyattributedmr.model.VKeyattributedmrPackage;
21: import org.eclipse.emf.ecp.view.spi.model.VDomainModelReference;
22: import org.eclipse.emf.ecp.view.spi.model.VFeaturePathDomainModelReference;
23:
24: /**
25: * <!-- begin-user-doc --> The <b>Switch</b> for the model's inheritance
26: * hierarchy. It supports the call {@link #doSwitch(EObject) doSwitch(object)} to invoke the <code>caseXXX</code> method
27: * for each class of the model,
28: * starting with the actual class of the object and proceeding up the
29: * inheritance hierarchy until a non-null result is returned, which is the
30: * result of the switch. <!-- end-user-doc -->
31: *
32: * @see org.eclipse.emf.ecp.view.spi.keyattributedmr.model.VKeyattributedmrPackage
33: * @generated
34: */
35: public class KeyattributedmrSwitch<T> extends Switch<T> {
36:         /**
37:          * The cached model package
38:          * <!-- begin-user-doc --> <!-- end-user-doc -->
39:          *
40:          * @generated
41:          */
42:         protected static VKeyattributedmrPackage modelPackage;
43:
44:         /**
45:          * Creates an instance of the switch.
46:          * <!-- begin-user-doc --> <!--
47:          * end-user-doc -->
48:          *
49:          * @generated
50:          */
51:         public KeyattributedmrSwitch() {
52:•                if (modelPackage == null) {
53:                         modelPackage = VKeyattributedmrPackage.eINSTANCE;
54:                 }
55:         }
56:
57:         /**
58:          * Checks whether this is a switch for the given package. <!--
59:          * begin-user-doc --> <!-- end-user-doc -->
60:          *
61:          * @parameter ePackage the package in question.
62:          * @return whether this is a switch for the given package.
63:          * @generated
64:          */
65:         @Override
66:         protected boolean isSwitchFor(EPackage ePackage) {
67:•                return ePackage == modelPackage;
68:         }
69:
70:         /**
71:          * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that
72:          * result.
73:          * <!-- begin-user-doc --> <!--
74:          * end-user-doc -->
75:          *
76:          * @return the first non-null result returned by a <code>caseXXX</code> call.
77:          * @generated
78:          */
79:         @Override
80:         protected T doSwitch(int classifierID, EObject theEObject) {
81:•                switch (classifierID) {
82:                 case VKeyattributedmrPackage.KEY_ATTRIBUTE_DOMAIN_MODEL_REFERENCE: {
83:                         final VKeyAttributeDomainModelReference keyAttributeDomainModelReference = (VKeyAttributeDomainModelReference) theEObject;
84:                         T result = caseKeyAttributeDomainModelReference(keyAttributeDomainModelReference);
85:•                        if (result == null) {
86:                                 result = caseFeaturePathDomainModelReference(keyAttributeDomainModelReference);
87:                         }
88:•                        if (result == null) {
89:                                 result = caseDomainModelReference(keyAttributeDomainModelReference);
90:                         }
91:•                        if (result == null) {
92:                                 result = defaultCase(theEObject);
93:                         }
94:                         return result;
95:                 }
96:                 default:
97:                         return defaultCase(theEObject);
98:                 }
99:         }
100:
101:         /**
102:          * Returns the result of interpreting the object as an instance of '<em>Key Attribute Domain Model Reference</em>'.
103:          * <!-- begin-user-doc -->
104:          * This implementation returns null; returning a non-null result will
105:          * terminate the switch. <!-- end-user-doc -->
106:          *
107:          * @param object the target of the switch.
108:          * @return the result of interpreting the object as an instance of '<em>Key Attribute Domain Model Reference</em>'.
109:          * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
110:          * @generated
111:          */
112:         public T caseKeyAttributeDomainModelReference(
113:                 VKeyAttributeDomainModelReference object) {
114:                 return null;
115:         }
116:
117:         /**
118:          * Returns the result of interpreting the object as an instance of '<em>Domain Model Reference</em>'.
119:          * <!-- begin-user-doc --> This
120:          * implementation returns null; returning a non-null result will terminate
121:          * the switch. <!-- end-user-doc -->
122:          *
123:          * @param object the target of the switch.
124:          * @return the result of interpreting the object as an instance of '<em>Domain Model Reference</em>'.
125:          * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
126:          * @generated
127:          */
128:         public T caseDomainModelReference(VDomainModelReference object) {
129:                 return null;
130:         }
131:
132:         /**
133:          * Returns the result of interpreting the object as an instance of '<em>Feature Path Domain Model Reference</em>'.
134:          * <!-- begin-user-doc -->
135:          * This implementation returns null; returning a non-null result will
136:          * terminate the switch. <!-- end-user-doc -->
137:          *
138:          * @param object the target of the switch.
139:          * @return the result of interpreting the object as an instance of '<em>Feature Path Domain Model Reference</em>'.
140:          * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
141:          * @generated
142:          */
143:         public T caseFeaturePathDomainModelReference(
144:                 VFeaturePathDomainModelReference object) {
145:                 return null;
146:         }
147:
148:         /**
149:          * Returns the result of interpreting the object as an instance of '<em>EObject</em>'.
150:          * <!-- begin-user-doc --> This implementation returns
151:          * null; returning a non-null result will terminate the switch, but this is
152:          * the last case anyway. <!-- end-user-doc -->
153:          *
154:          * @param object the target of the switch.
155:          * @return the result of interpreting the object as an instance of '<em>EObject</em>'.
156:          * @see #doSwitch(org.eclipse.emf.ecore.EObject)
157:          * @generated
158:          */
159:         @Override
160:         public T defaultCase(EObject object) {
161:                 return null;
162:         }
163:
164: } // KeyattributedmrSwitch