Skip to content

Package: ErrorAdapterFactory

ErrorAdapterFactory

nameinstructionbranchcomplexitylinemethod
ErrorAdapterFactory()
M: 13 C: 0
0%
M: 2 C: 0
0%
M: 2 C: 0
0%
M: 5 C: 0
0%
M: 1 C: 0
0%
createAdapter(Notifier)
M: 7 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
createDMRLocationAdapter()
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%
createEMFLocationAdapter()
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%
createEObjectAdapter()
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%
createErrorReportAdapter()
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%
createSettingLocationAdapter()
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%
createSettingToSheetMappingAdapter()
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%
createSheetLocationAdapter()
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%
createSpreadsheetImportResultAdapter()
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%
isFactoryForType(Object)
M: 20 C: 0
0%
M: 6 C: 0
0%
M: 4 C: 0
0%
M: 5 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.common.notify.Adapter;
17: import org.eclipse.emf.common.notify.Notifier;
18: import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl;
19: import org.eclipse.emf.ecore.EObject;
20: import org.eclipse.emfforms.spi.spreadsheet.core.error.model.DMRLocation;
21: import org.eclipse.emfforms.spi.spreadsheet.core.error.model.EMFLocation;
22: import org.eclipse.emfforms.spi.spreadsheet.core.error.model.ErrorPackage;
23: import org.eclipse.emfforms.spi.spreadsheet.core.error.model.ErrorReport;
24: import org.eclipse.emfforms.spi.spreadsheet.core.error.model.SettingLocation;
25: import org.eclipse.emfforms.spi.spreadsheet.core.error.model.SettingToSheetMapping;
26: import org.eclipse.emfforms.spi.spreadsheet.core.error.model.SheetLocation;
27: import org.eclipse.emfforms.spi.spreadsheet.core.error.model.SpreadsheetImportResult;
28:
29: /**
30: * <!-- begin-user-doc -->
31: * The <b>Adapter Factory</b> for the model.
32: * It provides an adapter <code>createXXX</code> method for each class of the model.
33: * <!-- end-user-doc -->
34: *
35: * @see org.eclipse.emfforms.spi.spreadsheet.core.error.model.ErrorPackage
36: * @generated
37: */
38: public class ErrorAdapterFactory extends AdapterFactoryImpl {
39:         /**
40:          * The cached model package.
41:          * <!-- begin-user-doc -->
42:          * <!-- end-user-doc -->
43:          *
44:          * @generated
45:          */
46:         protected static ErrorPackage modelPackage;
47:
48:         /**
49:          * Creates an instance of the adapter factory.
50:          * <!-- begin-user-doc -->
51:          * <!-- end-user-doc -->
52:          *
53:          * @generated
54:          */
55:         public ErrorAdapterFactory() {
56:•                if (modelPackage == null) {
57:                         modelPackage = ErrorPackage.eINSTANCE;
58:                 }
59:         }
60:
61:         /**
62:          * Returns whether this factory is applicable for the type of the object.
63:          * <!-- begin-user-doc -->
64:          * This implementation returns <code>true</code> if the object is either the model's package or is an instance
65:          * object of the model.
66:          * <!-- end-user-doc -->
67:          *
68:          * @return whether this factory is applicable for the type of the object.
69:          * @generated
70:          */
71:         @Override
72:         public boolean isFactoryForType(Object object) {
73:•                if (object == modelPackage) {
74:                         return true;
75:                 }
76:•                if (object instanceof EObject) {
77:•                        return ((EObject) object).eClass().getEPackage() == modelPackage;
78:                 }
79:                 return false;
80:         }
81:
82:         /**
83:          * The switch that delegates to the <code>createXXX</code> methods.
84:          * <!-- begin-user-doc -->
85:          * <!-- end-user-doc -->
86:          *
87:          * @generated
88:          */
89:         protected ErrorSwitch<Adapter> modelSwitch = new ErrorSwitch<Adapter>() {
90:                 @Override
91:                 public Adapter caseSpreadsheetImportResult(SpreadsheetImportResult object) {
92:                         return createSpreadsheetImportResultAdapter();
93:                 }
94:
95:                 @Override
96:                 public Adapter caseErrorReport(ErrorReport object) {
97:                         return createErrorReportAdapter();
98:                 }
99:
100:                 @Override
101:                 public Adapter caseSheetLocation(SheetLocation object) {
102:                         return createSheetLocationAdapter();
103:                 }
104:
105:                 @Override
106:                 public Adapter caseEMFLocation(EMFLocation object) {
107:                         return createEMFLocationAdapter();
108:                 }
109:
110:                 @Override
111:                 public Adapter caseSettingLocation(SettingLocation object) {
112:                         return createSettingLocationAdapter();
113:                 }
114:
115:                 @Override
116:                 public Adapter caseDMRLocation(DMRLocation object) {
117:                         return createDMRLocationAdapter();
118:                 }
119:
120:                 @Override
121:                 public Adapter caseSettingToSheetMapping(SettingToSheetMapping object) {
122:                         return createSettingToSheetMappingAdapter();
123:                 }
124:
125:                 @Override
126:                 public Adapter defaultCase(EObject object) {
127:                         return createEObjectAdapter();
128:                 }
129:         };
130:
131:         /**
132:          * Creates an adapter for the <code>target</code>.
133:          * <!-- begin-user-doc -->
134:          * <!-- end-user-doc -->
135:          *
136:          * @param target the object to adapt.
137:          * @return the adapter for the <code>target</code>.
138:          * @generated
139:          */
140:         @Override
141:         public Adapter createAdapter(Notifier target) {
142:                 return modelSwitch.doSwitch((EObject) target);
143:         }
144:
145:         /**
146:          * Creates a new adapter for an object of class '
147:          * {@link org.eclipse.emfforms.spi.spreadsheet.core.error.model.SpreadsheetImportResult
148:          * <em>Spreadsheet Import Result</em>}'.
149:          * <!-- begin-user-doc -->
150:          * This default implementation returns null so that we can easily ignore cases;
151:          * it's useful to ignore a case when inheritance will catch all the cases anyway.
152:          * <!-- end-user-doc -->
153:          *
154:          * @return the new adapter.
155:          * @see org.eclipse.emfforms.spi.spreadsheet.core.error.model.SpreadsheetImportResult
156:          * @generated
157:          */
158:         public Adapter createSpreadsheetImportResultAdapter() {
159:                 return null;
160:         }
161:
162:         /**
163:          * Creates a new adapter for an object of class '
164:          * {@link org.eclipse.emfforms.spi.spreadsheet.core.error.model.ErrorReport <em>Report</em>}'.
165:          * <!-- begin-user-doc -->
166:          * This default implementation returns null so that we can easily ignore cases;
167:          * it's useful to ignore a case when inheritance will catch all the cases anyway.
168:          * <!-- end-user-doc -->
169:          *
170:          * @return the new adapter.
171:          * @see org.eclipse.emfforms.spi.spreadsheet.core.error.model.ErrorReport
172:          * @generated
173:          */
174:         public Adapter createErrorReportAdapter() {
175:                 return null;
176:         }
177:
178:         /**
179:          * Creates a new adapter for an object of class '
180:          * {@link org.eclipse.emfforms.spi.spreadsheet.core.error.model.EMFLocation <em>EMF Location</em>}'.
181:          * <!-- begin-user-doc -->
182:          * This default implementation returns null so that we can easily ignore cases;
183:          * it's useful to ignore a case when inheritance will catch all the cases anyway.
184:          * <!-- end-user-doc -->
185:          *
186:          * @return the new adapter.
187:          * @see org.eclipse.emfforms.spi.spreadsheet.core.error.model.EMFLocation
188:          * @generated
189:          */
190:         public Adapter createEMFLocationAdapter() {
191:                 return null;
192:         }
193:
194:         /**
195:          * Creates a new adapter for an object of class '
196:          * {@link org.eclipse.emfforms.spi.spreadsheet.core.error.model.SettingLocation <em>Setting Location</em>}'.
197:          * <!-- begin-user-doc -->
198:          * This default implementation returns null so that we can easily ignore cases;
199:          * it's useful to ignore a case when inheritance will catch all the cases anyway.
200:          * <!-- end-user-doc -->
201:          *
202:          * @return the new adapter.
203:          * @see org.eclipse.emfforms.spi.spreadsheet.core.error.model.SettingLocation
204:          * @generated
205:          */
206:         public Adapter createSettingLocationAdapter() {
207:                 return null;
208:         }
209:
210:         /**
211:          * Creates a new adapter for an object of class '
212:          * {@link org.eclipse.emfforms.spi.spreadsheet.core.error.model.DMRLocation <em>DMR Location</em>}'.
213:          * <!-- begin-user-doc -->
214:          * This default implementation returns null so that we can easily ignore cases;
215:          * it's useful to ignore a case when inheritance will catch all the cases anyway.
216:          * <!-- end-user-doc -->
217:          *
218:          * @return the new adapter.
219:          * @see org.eclipse.emfforms.spi.spreadsheet.core.error.model.DMRLocation
220:          * @generated
221:          */
222:         public Adapter createDMRLocationAdapter() {
223:                 return null;
224:         }
225:
226:         /**
227:          * Creates a new adapter for an object of class '
228:          * {@link org.eclipse.emfforms.spi.spreadsheet.core.error.model.SettingToSheetMapping
229:          * <em>Setting To Sheet Mapping</em>}'.
230:          * <!-- begin-user-doc -->
231:          * This default implementation returns null so that we can easily ignore cases;
232:          * it's useful to ignore a case when inheritance will catch all the cases anyway.
233:          * <!-- end-user-doc -->
234:          *
235:          * @return the new adapter.
236:          * @see org.eclipse.emfforms.spi.spreadsheet.core.error.model.SettingToSheetMapping
237:          * @generated
238:          */
239:         public Adapter createSettingToSheetMappingAdapter() {
240:                 return null;
241:         }
242:
243:         /**
244:          * Creates a new adapter for an object of class '
245:          * {@link org.eclipse.emfforms.spi.spreadsheet.core.error.model.SheetLocation <em>Sheet Location</em>}'.
246:          * <!-- begin-user-doc -->
247:          * This default implementation returns null so that we can easily ignore cases;
248:          * it's useful to ignore a case when inheritance will catch all the cases anyway.
249:          * <!-- end-user-doc -->
250:          *
251:          * @return the new adapter.
252:          * @see org.eclipse.emfforms.spi.spreadsheet.core.error.model.SheetLocation
253:          * @generated
254:          */
255:         public Adapter createSheetLocationAdapter() {
256:                 return null;
257:         }
258:
259:         /**
260:          * Creates a new adapter for the default case.
261:          * <!-- begin-user-doc -->
262:          * This default implementation returns null.
263:          * <!-- end-user-doc -->
264:          *
265:          * @return the new adapter.
266:          * @generated
267:          */
268:         public Adapter createEObjectAdapter() {
269:                 return null;
270:         }
271:
272: } // ErrorAdapterFactory