Skip to content

Package: IndexsegmentSwitch

IndexsegmentSwitch

nameinstructionbranchcomplexitylinemethod
IndexsegmentSwitch()
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%
caseDomainModelReferenceSegment(VDomainModelReferenceSegment)
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%
caseFeatureDomainModelReferenceSegment(VFeatureDomainModelReferenceSegment)
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%
caseIndexDomainModelReferenceSegment(VIndexDomainModelReferenceSegment)
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-2018 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: * Lucas Koehler - initial API and implementation
13: */
14: package org.eclipse.emfforms.spi.view.indexsegment.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.model.VDomainModelReferenceSegment;
20: import org.eclipse.emf.ecp.view.spi.model.VFeatureDomainModelReferenceSegment;
21: import org.eclipse.emfforms.spi.view.indexsegment.model.VIndexDomainModelReferenceSegment;
22: import org.eclipse.emfforms.spi.view.indexsegment.model.VIndexsegmentPackage;
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)}
27: * to invoke the <code>caseXXX</code> method 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.emfforms.spi.view.indexsegment.model.VIndexsegmentPackage
33: * @generated
34: */
35: public class IndexsegmentSwitch<T> extends Switch<T> {
36:         /**
37:          * The cached model package <!-- begin-user-doc --> <!-- end-user-doc -->
38:          *
39:          * @generated
40:          */
41:         protected static VIndexsegmentPackage modelPackage;
42:
43:         /**
44:          * Creates an instance of the switch. <!-- begin-user-doc --> <!-- end-user-doc
45:          * -->
46:          *
47:          * @generated
48:          */
49:         public IndexsegmentSwitch() {
50:•                if (modelPackage == null) {
51:                         modelPackage = VIndexsegmentPackage.eINSTANCE;
52:                 }
53:         }
54:
55:         /**
56:          * Checks whether this is a switch for the given package. <!-- begin-user-doc
57:          * --> <!-- end-user-doc -->
58:          *
59:          * @param ePackage the package in question.
60:          * @return whether this is a switch for the given package.
61:          * @generated
62:          */
63:         @Override
64:         protected boolean isSwitchFor(EPackage ePackage) {
65:•                return ePackage == modelPackage;
66:         }
67:
68:         /**
69:          * Calls <code>caseXXX</code> for each class of the model until one returns a
70:          * non null result; it yields that result. <!-- begin-user-doc --> <!--
71:          * end-user-doc -->
72:          *
73:          * @return the first non-null result returned by a <code>caseXXX</code> call.
74:          * @generated
75:          */
76:         @Override
77:         protected T doSwitch(int classifierID, EObject theEObject) {
78:•                switch (classifierID) {
79:                 case VIndexsegmentPackage.INDEX_DOMAIN_MODEL_REFERENCE_SEGMENT: {
80:                         final VIndexDomainModelReferenceSegment indexDomainModelReferenceSegment = (VIndexDomainModelReferenceSegment) theEObject;
81:                         T result = caseIndexDomainModelReferenceSegment(indexDomainModelReferenceSegment);
82:•                        if (result == null) {
83:                                 result = caseFeatureDomainModelReferenceSegment(indexDomainModelReferenceSegment);
84:                         }
85:•                        if (result == null) {
86:                                 result = caseDomainModelReferenceSegment(indexDomainModelReferenceSegment);
87:                         }
88:•                        if (result == null) {
89:                                 result = defaultCase(theEObject);
90:                         }
91:                         return result;
92:                 }
93:                 default:
94:                         return defaultCase(theEObject);
95:                 }
96:         }
97:
98:         /**
99:          * Returns the result of interpreting the object as an instance of '<em>Index
100:          * Domain Model Reference Segment</em>'. <!-- begin-user-doc --> This
101:          * implementation returns null; returning a non-null result will terminate the
102:          * switch. <!-- end-user-doc -->
103:          *
104:          * @param object the target of the switch.
105:          * @return the result of interpreting the object as an instance of '<em>Index
106:          * Domain Model Reference Segment</em>'.
107:          * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
108:          * @generated
109:          */
110:         public T caseIndexDomainModelReferenceSegment(VIndexDomainModelReferenceSegment object) {
111:                 return null;
112:         }
113:
114:         /**
115:          * Returns the result of interpreting the object as an instance of '<em>Domain
116:          * Model Reference Segment</em>'. <!-- begin-user-doc --> This implementation
117:          * returns null; returning a non-null result will terminate the switch. <!--
118:          * end-user-doc -->
119:          *
120:          * @param object the target of the switch.
121:          * @return the result of interpreting the object as an instance of '<em>Domain
122:          * Model Reference Segment</em>'.
123:          * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
124:          * @generated
125:          */
126:         public T caseDomainModelReferenceSegment(VDomainModelReferenceSegment object) {
127:                 return null;
128:         }
129:
130:         /**
131:          * Returns the result of interpreting the object as an instance of '<em>Feature
132:          * Domain Model Reference Segment</em>'. <!-- begin-user-doc --> This
133:          * implementation returns null; returning a non-null result will terminate the
134:          * switch. <!-- end-user-doc -->
135:          *
136:          * @param object the target of the switch.
137:          * @return the result of interpreting the object as an instance of '<em>Feature
138:          * Domain Model Reference Segment</em>'.
139:          * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
140:          * @generated
141:          */
142:         public T caseFeatureDomainModelReferenceSegment(VFeatureDomainModelReferenceSegment object) {
143:                 return null;
144:         }
145:
146:         /**
147:          * Returns the result of interpreting the object as an instance of
148:          * '<em>EObject</em>'. <!-- begin-user-doc --> This implementation returns null;
149:          * returning a non-null result will terminate the switch, but this is the last
150:          * case anyway. <!-- end-user-doc -->
151:          *
152:          * @param object the target of the switch.
153:          * @return the result of interpreting the object as an instance of
154:          * '<em>EObject</em>'.
155:          * @see #doSwitch(org.eclipse.emf.ecore.EObject)
156:          * @generated
157:          */
158:         @Override
159:         public T defaultCase(EObject object) {
160:                 return null;
161:         }
162:
163: } // IndexsegmentSwitch