Skip to content

Package: TestAdapterFactory$1

TestAdapterFactory$1

nameinstructionbranchcomplexitylinemethod
caseA(A)
M: 4 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
caseB(B)
M: 4 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
caseC(C)
M: 4 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
caseD(D)
M: 4 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
caseDExtended(DExtended)
M: 4 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
caseE(E)
M: 4 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
caseEClassToAMap(Map.Entry)
M: 4 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
caseEClassToEMap(Map.Entry)
M: 4 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
caseEClassToEStringMap(Map.Entry)
M: 4 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
caseF(F)
M: 4 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: 4 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
{...}
M: 6 C: 0
0%
M: 0 C: 0
100%
M: 1 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: * Lucas Koehler - initial API and implementation
13: */
14: package org.eclipse.emfforms.core.services.databinding.testmodel.test.model.util;
15:
16: import java.util.Map;
17:
18: import org.eclipse.emf.common.notify.Adapter;
19: import org.eclipse.emf.common.notify.Notifier;
20: import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl;
21: import org.eclipse.emf.ecore.EClass;
22: import org.eclipse.emf.ecore.EObject;
23: import org.eclipse.emfforms.core.services.databinding.testmodel.test.model.A;
24: import org.eclipse.emfforms.core.services.databinding.testmodel.test.model.B;
25: import org.eclipse.emfforms.core.services.databinding.testmodel.test.model.C;
26: import org.eclipse.emfforms.core.services.databinding.testmodel.test.model.D;
27: import org.eclipse.emfforms.core.services.databinding.testmodel.test.model.DExtended;
28: import org.eclipse.emfforms.core.services.databinding.testmodel.test.model.E;
29: import org.eclipse.emfforms.core.services.databinding.testmodel.test.model.F;
30: import org.eclipse.emfforms.core.services.databinding.testmodel.test.model.TestPackage;
31:
32: /**
33: * <!-- begin-user-doc -->
34: * The <b>Adapter Factory</b> for the model.
35: * It provides an adapter <code>createXXX</code> method for each class of the model.
36: * <!-- end-user-doc -->
37: *
38: * @see org.eclipse.emfforms.core.services.databinding.testmodel.test.model.TestPackage
39: * @generated
40: */
41: public class TestAdapterFactory extends AdapterFactoryImpl {
42:         /**
43:          * The cached model package.
44:          * <!-- begin-user-doc -->
45:          * <!-- end-user-doc -->
46:          *
47:          * @generated
48:          */
49:         protected static TestPackage modelPackage;
50:
51:         /**
52:          * Creates an instance of the adapter factory.
53:          * <!-- begin-user-doc -->
54:          * <!-- end-user-doc -->
55:          *
56:          * @generated
57:          */
58:         public TestAdapterFactory() {
59:                 if (modelPackage == null) {
60:                         modelPackage = TestPackage.eINSTANCE;
61:                 }
62:         }
63:
64:         /**
65:          * Returns whether this factory is applicable for the type of the object.
66:          * <!-- begin-user-doc -->
67:          * This implementation returns <code>true</code> if the object is either the model's package or is an instance
68:          * object of the model.
69:          * <!-- end-user-doc -->
70:          *
71:          * @return whether this factory is applicable for the type of the object.
72:          * @generated
73:          */
74:         @Override
75:         public boolean isFactoryForType(Object object) {
76:                 if (object == modelPackage) {
77:                         return true;
78:                 }
79:                 if (object instanceof EObject) {
80:                         return ((EObject) object).eClass().getEPackage() == modelPackage;
81:                 }
82:                 return false;
83:         }
84:
85:         /**
86:          * The switch that delegates to the <code>createXXX</code> methods.
87:          * <!-- begin-user-doc -->
88:          * <!-- end-user-doc -->
89:          *
90:          * @generated
91:          */
92:         protected TestSwitch<Adapter> modelSwitch = new TestSwitch<Adapter>() {
93:                 @Override
94:                 public Adapter caseA(A object) {
95:                         return createAAdapter();
96:                 }
97:
98:                 @Override
99:                 public Adapter caseB(B object) {
100:                         return createBAdapter();
101:                 }
102:
103:                 @Override
104:                 public Adapter caseC(C object) {
105:                         return createCAdapter();
106:                 }
107:
108:                 @Override
109:                 public Adapter caseD(D object) {
110:                         return createDAdapter();
111:                 }
112:
113:                 @Override
114:                 public Adapter caseEClassToEStringMap(Map.Entry<EClass, String> object) {
115:                         return createEClassToEStringMapAdapter();
116:                 }
117:
118:                 @Override
119:                 public Adapter caseEClassToAMap(Map.Entry<EClass, A> object) {
120:                         return createEClassToAMapAdapter();
121:                 }
122:
123:                 @Override
124:                 public Adapter caseDExtended(DExtended object) {
125:                         return createDExtendedAdapter();
126:                 }
127:
128:                 @Override
129:                 public Adapter caseE(E object) {
130:                         return createEAdapter();
131:                 }
132:
133:                 @Override
134:                 public Adapter caseF(F object) {
135:                         return createFAdapter();
136:                 }
137:
138:                 @Override
139:                 public Adapter caseEClassToEMap(Map.Entry<EClass, E> object) {
140:                         return createEClassToEMapAdapter();
141:                 }
142:
143:                 @Override
144:                 public Adapter defaultCase(EObject object) {
145:                         return createEObjectAdapter();
146:                 }
147:         };
148:
149:         /**
150:          * Creates an adapter for the <code>target</code>.
151:          * <!-- begin-user-doc -->
152:          * <!-- end-user-doc -->
153:          *
154:          * @param target the object to adapt.
155:          * @return the adapter for the <code>target</code>.
156:          * @generated
157:          */
158:         @Override
159:         public Adapter createAdapter(Notifier target) {
160:                 return modelSwitch.doSwitch((EObject) target);
161:         }
162:
163:         /**
164:          * Creates a new adapter for an object of class
165:          * '{@link org.eclipse.emfforms.core.services.databinding.testmodel.test.model.A <em>A</em>}'.
166:          * <!-- begin-user-doc -->
167:          * This default implementation returns null so that we can easily ignore cases;
168:          * it's useful to ignore a case when inheritance will catch all the cases anyway.
169:          * <!-- end-user-doc -->
170:          *
171:          * @return the new adapter.
172:          * @see org.eclipse.emfforms.core.services.databinding.testmodel.test.model.A
173:          * @generated
174:          */
175:         public Adapter createAAdapter() {
176:                 return null;
177:         }
178:
179:         /**
180:          * Creates a new adapter for an object of class
181:          * '{@link org.eclipse.emfforms.core.services.databinding.testmodel.test.model.B <em>B</em>}'.
182:          * <!-- begin-user-doc -->
183:          * This default implementation returns null so that we can easily ignore cases;
184:          * it's useful to ignore a case when inheritance will catch all the cases anyway.
185:          * <!-- end-user-doc -->
186:          *
187:          * @return the new adapter.
188:          * @see org.eclipse.emfforms.core.services.databinding.testmodel.test.model.B
189:          * @generated
190:          */
191:         public Adapter createBAdapter() {
192:                 return null;
193:         }
194:
195:         /**
196:          * Creates a new adapter for an object of class
197:          * '{@link org.eclipse.emfforms.core.services.databinding.testmodel.test.model.C <em>C</em>}'.
198:          * <!-- begin-user-doc -->
199:          * This default implementation returns null so that we can easily ignore cases;
200:          * it's useful to ignore a case when inheritance will catch all the cases anyway.
201:          * <!-- end-user-doc -->
202:          *
203:          * @return the new adapter.
204:          * @see org.eclipse.emfforms.core.services.databinding.testmodel.test.model.C
205:          * @generated
206:          */
207:         public Adapter createCAdapter() {
208:                 return null;
209:         }
210:
211:         /**
212:          * Creates a new adapter for an object of class
213:          * '{@link org.eclipse.emfforms.core.services.databinding.testmodel.test.model.D <em>D</em>}'.
214:          * <!-- begin-user-doc -->
215:          * This default implementation returns null so that we can easily ignore cases;
216:          * it's useful to ignore a case when inheritance will catch all the cases anyway.
217:          * <!-- end-user-doc -->
218:          *
219:          * @return the new adapter.
220:          * @see org.eclipse.emfforms.core.services.databinding.testmodel.test.model.D
221:          * @generated
222:          */
223:         public Adapter createDAdapter() {
224:                 return null;
225:         }
226:
227:         /**
228:          * Creates a new adapter for an object of class '{@link java.util.Map.Entry <em>EClass To EString Map</em>}'.
229:          * <!-- begin-user-doc -->
230:          * This default implementation returns null so that we can easily ignore cases;
231:          * it's useful to ignore a case when inheritance will catch all the cases anyway.
232:          * <!-- end-user-doc -->
233:          *
234:          * @return the new adapter.
235:          * @see java.util.Map.Entry
236:          * @generated
237:          */
238:         public Adapter createEClassToEStringMapAdapter() {
239:                 return null;
240:         }
241:
242:         /**
243:          * Creates a new adapter for an object of class '{@link java.util.Map.Entry <em>EClass To AMap</em>}'.
244:          * <!-- begin-user-doc -->
245:          * This default implementation returns null so that we can easily ignore cases;
246:          * it's useful to ignore a case when inheritance will catch all the cases anyway.
247:          * <!-- end-user-doc -->
248:          *
249:          * @return the new adapter.
250:          * @see java.util.Map.Entry
251:          * @generated
252:          */
253:         public Adapter createEClassToAMapAdapter() {
254:                 return null;
255:         }
256:
257:         /**
258:          * Creates a new adapter for an object of class
259:          * '{@link org.eclipse.emfforms.core.services.databinding.testmodel.test.model.DExtended <em>DExtended</em>}'.
260:          * <!-- begin-user-doc -->
261:          * This default implementation returns null so that we can easily ignore cases;
262:          * it's useful to ignore a case when inheritance will catch all the cases anyway.
263:          * <!-- end-user-doc -->
264:          *
265:          * @return the new adapter.
266:          * @see org.eclipse.emfforms.core.services.databinding.testmodel.test.model.DExtended
267:          * @generated
268:          */
269:         public Adapter createDExtendedAdapter() {
270:                 return null;
271:         }
272:
273:         /**
274:          * Creates a new adapter for an object of class
275:          * '{@link org.eclipse.emfforms.core.services.databinding.testmodel.test.model.E <em>E</em>}'.
276:          * <!-- begin-user-doc -->
277:          * This default implementation returns null so that we can easily ignore cases;
278:          * it's useful to ignore a case when inheritance will catch all the cases anyway.
279:          * <!-- end-user-doc -->
280:          *
281:          * @return the new adapter.
282:          * @see org.eclipse.emfforms.core.services.databinding.testmodel.test.model.E
283:          * @generated
284:          */
285:         public Adapter createEAdapter() {
286:                 return null;
287:         }
288:
289:         /**
290:          * Creates a new adapter for an object of class
291:          * '{@link org.eclipse.emfforms.core.services.databinding.testmodel.test.model.F <em>F</em>}'.
292:          * <!-- begin-user-doc -->
293:          * This default implementation returns null so that we can easily ignore cases;
294:          * it's useful to ignore a case when inheritance will catch all the cases anyway.
295:          * <!-- end-user-doc -->
296:          *
297:          * @return the new adapter.
298:          * @see org.eclipse.emfforms.core.services.databinding.testmodel.test.model.F
299:          * @generated
300:          */
301:         public Adapter createFAdapter() {
302:                 return null;
303:         }
304:
305:         /**
306:          * Creates a new adapter for an object of class '{@link java.util.Map.Entry <em>EClass To EMap</em>}'.
307:          * <!-- begin-user-doc -->
308:          * This default implementation returns null so that we can easily ignore cases;
309:          * it's useful to ignore a case when inheritance will catch all the cases anyway.
310:          * <!-- end-user-doc -->
311:          *
312:          * @return the new adapter.
313:          * @see java.util.Map.Entry
314:          * @generated
315:          */
316:         public Adapter createEClassToEMapAdapter() {
317:                 return null;
318:         }
319:
320:         /**
321:          * Creates a new adapter for the default case.
322:          * <!-- begin-user-doc -->
323:          * This default implementation returns null.
324:          * <!-- end-user-doc -->
325:          *
326:          * @return the new adapter.
327:          * @generated
328:          */
329:         public Adapter createEObjectAdapter() {
330:                 return null;
331:         }
332:
333: } // TestAdapterFactory