Skip to content

Package: ErrorSwitch

ErrorSwitch

nameinstructionbranchcomplexitylinemethod
ErrorSwitch()
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%
caseDMRLocation(DMRLocation)
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%
caseEMFLocation(EMFLocation)
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%
caseErrorReport(ErrorReport)
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%
caseSettingLocation(SettingLocation)
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%
caseSettingToSheetMapping(SettingToSheetMapping)
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%
caseSheetLocation(SheetLocation)
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%
caseSpreadsheetImportResult(SpreadsheetImportResult)
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: 111 C: 0
0%
M: 22 C: 0
0%
M: 15 C: 0
0%
M: 37 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-2015 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: * Johannes Faltermeier - initial API and implementation
13: */
14: package org.eclipse.emfforms.spi.spreadsheet.core.error.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.emfforms.spi.spreadsheet.core.error.model.DMRLocation;
20: import org.eclipse.emfforms.spi.spreadsheet.core.error.model.EMFLocation;
21: import org.eclipse.emfforms.spi.spreadsheet.core.error.model.ErrorPackage;
22: import org.eclipse.emfforms.spi.spreadsheet.core.error.model.ErrorReport;
23: import org.eclipse.emfforms.spi.spreadsheet.core.error.model.SettingLocation;
24: import org.eclipse.emfforms.spi.spreadsheet.core.error.model.SettingToSheetMapping;
25: import org.eclipse.emfforms.spi.spreadsheet.core.error.model.SheetLocation;
26: import org.eclipse.emfforms.spi.spreadsheet.core.error.model.SpreadsheetImportResult;
27:
28: /**
29: * <!-- begin-user-doc -->
30: * The <b>Switch</b> for the model's inheritance hierarchy.
31: * It supports the call {@link #doSwitch(EObject) doSwitch(object)}
32: * to invoke the <code>caseXXX</code> method for each class of the model,
33: * starting with the actual class of the object
34: * and proceeding up the inheritance hierarchy
35: * until a non-null result is returned,
36: * which is the result of the switch.
37: * <!-- end-user-doc -->
38: *
39: * @see org.eclipse.emfforms.spi.spreadsheet.core.error.model.ErrorPackage
40: * @generated
41: */
42: public class ErrorSwitch<T> extends Switch<T> {
43:         /**
44:          * The cached model package
45:          * <!-- begin-user-doc -->
46:          * <!-- end-user-doc -->
47:          *
48:          * @generated
49:          */
50:         protected static ErrorPackage modelPackage;
51:
52:         /**
53:          * Creates an instance of the switch.
54:          * <!-- begin-user-doc -->
55:          * <!-- end-user-doc -->
56:          *
57:          * @generated
58:          */
59:         public ErrorSwitch() {
60:•                if (modelPackage == null) {
61:                         modelPackage = ErrorPackage.eINSTANCE;
62:                 }
63:         }
64:
65:         /**
66:          * Checks whether this is a switch for the given package.
67:          * <!-- begin-user-doc -->
68:          * <!-- end-user-doc -->
69:          *
70:          * @param ePackage the package in question.
71:          * @return whether this is a switch for the given package.
72:          * @generated
73:          */
74:         @Override
75:         protected boolean isSwitchFor(EPackage ePackage) {
76:•                return ePackage == modelPackage;
77:         }
78:
79:         /**
80:          * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that
81:          * result.
82:          * <!-- begin-user-doc -->
83:          * <!-- end-user-doc -->
84:          *
85:          * @return the first non-null result returned by a <code>caseXXX</code> call.
86:          * @generated
87:          */
88:         @Override
89:         protected T doSwitch(int classifierID, EObject theEObject) {
90:•                switch (classifierID) {
91:                 case ErrorPackage.SPREADSHEET_IMPORT_RESULT: {
92:                         final SpreadsheetImportResult spreadsheetImportResult = (SpreadsheetImportResult) theEObject;
93:                         T result = caseSpreadsheetImportResult(spreadsheetImportResult);
94:•                        if (result == null) {
95:                                 result = defaultCase(theEObject);
96:                         }
97:                         return result;
98:                 }
99:                 case ErrorPackage.ERROR_REPORT: {
100:                         final ErrorReport errorReport = (ErrorReport) theEObject;
101:                         T result = caseErrorReport(errorReport);
102:•                        if (result == null) {
103:                                 result = defaultCase(theEObject);
104:                         }
105:                         return result;
106:                 }
107:                 case ErrorPackage.SHEET_LOCATION: {
108:                         final SheetLocation sheetLocation = (SheetLocation) theEObject;
109:                         T result = caseSheetLocation(sheetLocation);
110:•                        if (result == null) {
111:                                 result = defaultCase(theEObject);
112:                         }
113:                         return result;
114:                 }
115:                 case ErrorPackage.EMF_LOCATION: {
116:                         final EMFLocation emfLocation = (EMFLocation) theEObject;
117:                         T result = caseEMFLocation(emfLocation);
118:•                        if (result == null) {
119:                                 result = defaultCase(theEObject);
120:                         }
121:                         return result;
122:                 }
123:                 case ErrorPackage.SETTING_LOCATION: {
124:                         final SettingLocation settingLocation = (SettingLocation) theEObject;
125:                         T result = caseSettingLocation(settingLocation);
126:•                        if (result == null) {
127:                                 result = defaultCase(theEObject);
128:                         }
129:                         return result;
130:                 }
131:                 case ErrorPackage.DMR_LOCATION: {
132:                         final DMRLocation dmrLocation = (DMRLocation) theEObject;
133:                         T result = caseDMRLocation(dmrLocation);
134:•                        if (result == null) {
135:                                 result = defaultCase(theEObject);
136:                         }
137:                         return result;
138:                 }
139:                 case ErrorPackage.SETTING_TO_SHEET_MAPPING: {
140:                         final SettingToSheetMapping settingToSheetMapping = (SettingToSheetMapping) theEObject;
141:                         T result = caseSettingToSheetMapping(settingToSheetMapping);
142:•                        if (result == null) {
143:                                 result = defaultCase(theEObject);
144:                         }
145:                         return result;
146:                 }
147:                 default:
148:                         return defaultCase(theEObject);
149:                 }
150:         }
151:
152:         /**
153:          * Returns the result of interpreting the object as an instance of '<em>Spreadsheet Import Result</em>'.
154:          * <!-- begin-user-doc -->
155:          * This implementation returns null;
156:          * returning a non-null result will terminate the switch.
157:          * <!-- end-user-doc -->
158:          *
159:          * @param object the target of the switch.
160:          * @return the result of interpreting the object as an instance of '<em>Spreadsheet Import Result</em>'.
161:          * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
162:          * @generated
163:          */
164:         public T caseSpreadsheetImportResult(SpreadsheetImportResult object) {
165:                 return null;
166:         }
167:
168:         /**
169:          * Returns the result of interpreting the object as an instance of '<em>Report</em>'.
170:          * <!-- begin-user-doc -->
171:          * This implementation returns null;
172:          * returning a non-null result will terminate the switch.
173:          * <!-- end-user-doc -->
174:          *
175:          * @param object the target of the switch.
176:          * @return the result of interpreting the object as an instance of '<em>Report</em>'.
177:          * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
178:          * @generated
179:          */
180:         public T caseErrorReport(ErrorReport object) {
181:                 return null;
182:         }
183:
184:         /**
185:          * Returns the result of interpreting the object as an instance of '<em>EMF Location</em>'.
186:          * <!-- begin-user-doc -->
187:          * This implementation returns null;
188:          * returning a non-null result will terminate the switch.
189:          * <!-- end-user-doc -->
190:          *
191:          * @param object the target of the switch.
192:          * @return the result of interpreting the object as an instance of '<em>EMF Location</em>'.
193:          * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
194:          * @generated
195:          */
196:         public T caseEMFLocation(EMFLocation object) {
197:                 return null;
198:         }
199:
200:         /**
201:          * Returns the result of interpreting the object as an instance of '<em>Setting Location</em>'.
202:          * <!-- begin-user-doc -->
203:          * This implementation returns null;
204:          * returning a non-null result will terminate the switch.
205:          * <!-- end-user-doc -->
206:          *
207:          * @param object the target of the switch.
208:          * @return the result of interpreting the object as an instance of '<em>Setting Location</em>'.
209:          * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
210:          * @generated
211:          */
212:         public T caseSettingLocation(SettingLocation object) {
213:                 return null;
214:         }
215:
216:         /**
217:          * Returns the result of interpreting the object as an instance of '<em>DMR Location</em>'.
218:          * <!-- begin-user-doc -->
219:          * This implementation returns null;
220:          * returning a non-null result will terminate the switch.
221:          * <!-- end-user-doc -->
222:          *
223:          * @param object the target of the switch.
224:          * @return the result of interpreting the object as an instance of '<em>DMR Location</em>'.
225:          * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
226:          * @generated
227:          */
228:         public T caseDMRLocation(DMRLocation object) {
229:                 return null;
230:         }
231:
232:         /**
233:          * Returns the result of interpreting the object as an instance of '<em>Setting To Sheet Mapping</em>'.
234:          * <!-- begin-user-doc -->
235:          * This implementation returns null;
236:          * returning a non-null result will terminate the switch.
237:          * <!-- end-user-doc -->
238:          *
239:          * @param object the target of the switch.
240:          * @return the result of interpreting the object as an instance of '<em>Setting To Sheet Mapping</em>'.
241:          * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
242:          * @generated
243:          */
244:         public T caseSettingToSheetMapping(SettingToSheetMapping object) {
245:                 return null;
246:         }
247:
248:         /**
249:          * Returns the result of interpreting the object as an instance of '<em>Sheet Location</em>'.
250:          * <!-- begin-user-doc -->
251:          * This implementation returns null;
252:          * returning a non-null result will terminate the switch.
253:          * <!-- end-user-doc -->
254:          *
255:          * @param object the target of the switch.
256:          * @return the result of interpreting the object as an instance of '<em>Sheet Location</em>'.
257:          * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
258:          * @generated
259:          */
260:         public T caseSheetLocation(SheetLocation object) {
261:                 return null;
262:         }
263:
264:         /**
265:          * Returns the result of interpreting the object as an instance of '<em>EObject</em>'.
266:          * <!-- begin-user-doc -->
267:          * This implementation returns null;
268:          * returning a non-null result will terminate the switch, but this is the last case anyway.
269:          * <!-- end-user-doc -->
270:          *
271:          * @param object the target of the switch.
272:          * @return the result of interpreting the object as an instance of '<em>EObject</em>'.
273:          * @see #doSwitch(org.eclipse.emf.ecore.EObject)
274:          * @generated
275:          */
276:         @Override
277:         public T defaultCase(EObject object) {
278:                 return null;
279:         }
280:
281: } // ErrorSwitch