Skip to content

Package: MappingdmrSwitch

MappingdmrSwitch

nameinstructionbranchcomplexitylinemethod
MappingdmrSwitch()
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%
caseMappingDomainModelReference(VMappingDomainModelReference)
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.mappingdmr.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.mappingdmr.model.VMappingDomainModelReference;
20: import org.eclipse.emf.ecp.view.spi.mappingdmr.model.VMappingdmrPackage;
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.mappingdmr.model.VMappingdmrPackage
33: * @generated
34: */
35: public class MappingdmrSwitch<T> extends Switch<T> {
36:         /**
37:          * The cached model package <!-- begin-user-doc --> <!-- end-user-doc -->
38:          *
39:          * @generated
40:          */
41:         protected static VMappingdmrPackage modelPackage;
42:
43:         /**
44:          * Creates an instance of the switch. <!-- begin-user-doc --> <!--
45:          * end-user-doc -->
46:          *
47:          * @generated
48:          */
49:         public MappingdmrSwitch() {
50:•                if (modelPackage == null) {
51:                         modelPackage = VMappingdmrPackage.eINSTANCE;
52:                 }
53:         }
54:
55:         /**
56:          * Checks whether this is a switch for the given package. <!--
57:          * begin-user-doc --> <!-- end-user-doc -->
58:          *
59:          * @parameter 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
70:          * a 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 VMappingdmrPackage.MAPPING_DOMAIN_MODEL_REFERENCE: {
80:                         final VMappingDomainModelReference mappingDomainModelReference = (VMappingDomainModelReference) theEObject;
81:                         T result = caseMappingDomainModelReference(mappingDomainModelReference);
82:•                        if (result == null) {
83:                                 result = caseFeaturePathDomainModelReference(mappingDomainModelReference);
84:                         }
85:•                        if (result == null) {
86:                                 result = caseDomainModelReference(mappingDomainModelReference);
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>Mapping Domain Model Reference</em>'. <!--
100:          * begin-user-doc --> This
101:          * implementation returns null; returning a non-null result will terminate
102:          * the switch. <!-- end-user-doc -->
103:          *
104:          * @param object
105:          * the target of the switch.
106:          * @return the result of interpreting the object as an instance of ' <em>Mapping Domain Model Reference</em>'.
107:          * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
108:          * @generated
109:          */
110:         public T caseMappingDomainModelReference(VMappingDomainModelReference object) {
111:                 return null;
112:         }
113:
114:         /**
115:          * Returns the result of interpreting the object as an instance of ' <em>Domain Model Reference</em>'. <!--
116:          * begin-user-doc --> This
117:          * implementation returns null; returning a non-null result will terminate
118:          * the switch. <!-- end-user-doc -->
119:          *
120:          * @param object
121:          * the target of the switch.
122:          * @return the result of interpreting the object as an instance of ' <em>Domain Model Reference</em>'.
123:          * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
124:          * @generated
125:          */
126:         public T caseDomainModelReference(VDomainModelReference object) {
127:                 return null;
128:         }
129:
130:         /**
131:          * Returns the result of interpreting the object as an instance of ' <em>Feature Path Domain Model Reference</em>'.
132:          * <!-- begin-user-doc -->
133:          * This implementation returns null; returning a non-null result will
134:          * terminate the switch. <!-- end-user-doc -->
135:          *
136:          * @param object
137:          * the target of the switch.
138:          * @return the result of interpreting the object as an instance of ' <em>Feature Path Domain Model Reference</em>'.
139:          * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
140:          * @generated
141:          */
142:         public T caseFeaturePathDomainModelReference(
143:                 VFeaturePathDomainModelReference object) {
144:                 return null;
145:         }
146:
147:         /**
148:          * Returns the result of interpreting the object as an instance of ' <em>EObject</em>'. <!-- begin-user-doc --> This
149:          * implementation returns
150:          * null; returning a non-null result will terminate the switch, but this is
151:          * the last case anyway. <!-- end-user-doc -->
152:          *
153:          * @param object
154:          * 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: } // MappingdmrSwitch