Skip to content

Package: ModelAdapterFactory

ModelAdapterFactory

nameinstructionbranchcomplexitylinemethod
ModelAdapterFactory()
M: 0 C: 13
100%
M: 0 C: 2
100%
M: 0 C: 2
100%
M: 0 C: 5
100%
M: 0 C: 1
100%
createAbstractCategorizationAdapter()
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%
createAdapter(Notifier)
M: 0 C: 7
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
createCategorizableElementAdapter()
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%
createCategoryAdapter()
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%
createDomainIntermediateAdapter()
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%
createDomainModelReferenceAdapter()
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%
createDomainRootAdapter()
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%
createDynamicContainmentItemAdapter()
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%
createDynamicContainmentTreeAdapter()
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%
createDynamicContainmentTreeDomainModelReferenceAdapter()
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%
createElementAdapter()
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%
createTestElementAdapter()
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%
createTestElementContainerAdapter()
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: 2 C: 18
90%
M: 1 C: 5
83%
M: 1 C: 3
75%
M: 0 C: 5
100%
M: 0 C: 1
100%

Coverage

1: /**
2: * Copyright (c) 2011-2013 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: * Edgar Mueller - initial API and implementation
13: */
14: package org.eclipse.emf.ecp.view.dynamictree.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.emf.ecp.view.dynamictree.model.DomainIntermediate;
21: import org.eclipse.emf.ecp.view.dynamictree.model.DomainRoot;
22: import org.eclipse.emf.ecp.view.dynamictree.model.DynamicContainmentItem;
23: import org.eclipse.emf.ecp.view.dynamictree.model.DynamicContainmentTree;
24: import org.eclipse.emf.ecp.view.dynamictree.model.DynamicContainmentTreeDomainModelReference;
25: import org.eclipse.emf.ecp.view.dynamictree.model.ModelPackage;
26: import org.eclipse.emf.ecp.view.dynamictree.model.TestElement;
27: import org.eclipse.emf.ecp.view.dynamictree.model.TestElementContainer;
28: import org.eclipse.emf.ecp.view.spi.categorization.model.VAbstractCategorization;
29: import org.eclipse.emf.ecp.view.spi.categorization.model.VCategorizableElement;
30: import org.eclipse.emf.ecp.view.spi.categorization.model.VCategory;
31: import org.eclipse.emf.ecp.view.spi.model.VDomainModelReference;
32: import org.eclipse.emf.ecp.view.spi.model.VElement;
33:
34: /**
35: * <!-- begin-user-doc -->
36: * The <b>Adapter Factory</b> for the model.
37: * It provides an adapter <code>createXXX</code> method for each class of the model.
38: * <!-- end-user-doc -->
39: *
40: * @see org.eclipse.emf.ecp.view.dynamictree.model.ModelPackage
41: * @generated
42: */
43: public class ModelAdapterFactory extends AdapterFactoryImpl {
44:         /**
45:          * The cached model package.
46:          * <!-- begin-user-doc -->
47:          * <!-- end-user-doc -->
48:          *
49:          * @generated
50:          */
51:         protected static ModelPackage modelPackage;
52:
53:         /**
54:          * Creates an instance of the adapter factory.
55:          * <!-- begin-user-doc -->
56:          * <!-- end-user-doc -->
57:          *
58:          * @generated
59:          */
60:         public ModelAdapterFactory() {
61:•                if (modelPackage == null) {
62:                         modelPackage = ModelPackage.eINSTANCE;
63:                 }
64:         }
65:
66:         /**
67:          * Returns whether this factory is applicable for the type of the object.
68:          * <!-- begin-user-doc -->
69:          * This implementation returns <code>true</code> if the object is either the model's package or is an instance
70:          * object of the model.
71:          * <!-- end-user-doc -->
72:          *
73:          * @return whether this factory is applicable for the type of the object.
74:          * @generated
75:          */
76:         @Override
77:         public boolean isFactoryForType(Object object) {
78:•                if (object == modelPackage) {
79:                         return true;
80:                 }
81:•                if (object instanceof EObject) {
82:•                        return ((EObject) object).eClass().getEPackage() == modelPackage;
83:                 }
84:                 return false;
85:         }
86:
87:         /**
88:          * The switch that delegates to the <code>createXXX</code> methods.
89:          * <!-- begin-user-doc -->
90:          * <!-- end-user-doc -->
91:          *
92:          * @generated
93:          */
94:         protected ModelSwitch<Adapter> modelSwitch = new ModelSwitch<Adapter>() {
95:                 @Override
96:                 public Adapter caseDynamicContainmentTree(DynamicContainmentTree object) {
97:                         return createDynamicContainmentTreeAdapter();
98:                 }
99:
100:                 @Override
101:                 public Adapter caseDynamicContainmentItem(DynamicContainmentItem object) {
102:                         return createDynamicContainmentItemAdapter();
103:                 }
104:
105:                 @Override
106:                 public Adapter caseTestElement(TestElement object) {
107:                         return createTestElementAdapter();
108:                 }
109:
110:                 @Override
111:                 public Adapter caseDomainRoot(DomainRoot object) {
112:                         return createDomainRootAdapter();
113:                 }
114:
115:                 @Override
116:                 public Adapter caseDomainIntermediate(DomainIntermediate object) {
117:                         return createDomainIntermediateAdapter();
118:                 }
119:
120:                 @Override
121:                 public Adapter caseTestElementContainer(TestElementContainer object) {
122:                         return createTestElementContainerAdapter();
123:                 }
124:
125:                 @Override
126:                 public Adapter caseDynamicContainmentTreeDomainModelReference(
127:                         DynamicContainmentTreeDomainModelReference object) {
128:                         return createDynamicContainmentTreeDomainModelReferenceAdapter();
129:                 }
130:
131:                 @Override
132:                 public Adapter caseElement(VElement object) {
133:                         return createElementAdapter();
134:                 }
135:
136:                 @Override
137:                 public Adapter caseCategorizableElement(VCategorizableElement object) {
138:                         return createCategorizableElementAdapter();
139:                 }
140:
141:                 @Override
142:                 public Adapter caseAbstractCategorization(VAbstractCategorization object) {
143:                         return createAbstractCategorizationAdapter();
144:                 }
145:
146:                 @Override
147:                 public Adapter caseCategory(VCategory object) {
148:                         return createCategoryAdapter();
149:                 }
150:
151:                 @Override
152:                 public Adapter caseDomainModelReference(VDomainModelReference object) {
153:                         return createDomainModelReferenceAdapter();
154:                 }
155:
156:                 @Override
157:                 public Adapter defaultCase(EObject object) {
158:                         return createEObjectAdapter();
159:                 }
160:         };
161:
162:         /**
163:          * Creates an adapter for the <code>target</code>.
164:          * <!-- begin-user-doc -->
165:          * <!-- end-user-doc -->
166:          *
167:          * @param target the object to adapt.
168:          * @return the adapter for the <code>target</code>.
169:          * @generated
170:          */
171:         @Override
172:         public Adapter createAdapter(Notifier target) {
173:                 return modelSwitch.doSwitch((EObject) target);
174:         }
175:
176:         /**
177:          * Creates a new adapter for an object of class '
178:          * {@link org.eclipse.emf.ecp.view.dynamictree.model.DynamicContainmentTree <em>Dynamic Containment Tree</em>}'.
179:          * <!-- begin-user-doc -->
180:          * This default implementation returns null so that we can easily ignore cases;
181:          * it's useful to ignore a case when inheritance will catch all the cases anyway.
182:          * <!-- end-user-doc -->
183:          *
184:          * @return the new adapter.
185:          * @see org.eclipse.emf.ecp.view.dynamictree.model.DynamicContainmentTree
186:          * @generated
187:          */
188:         public Adapter createDynamicContainmentTreeAdapter() {
189:                 return null;
190:         }
191:
192:         /**
193:          * Creates a new adapter for an object of class '
194:          * {@link org.eclipse.emf.ecp.view.dynamictree.model.DynamicContainmentItem <em>Dynamic Containment Item</em>}'.
195:          * <!-- begin-user-doc -->
196:          * This default implementation returns null so that we can easily ignore cases;
197:          * it's useful to ignore a case when inheritance will catch all the cases anyway.
198:          * <!-- end-user-doc -->
199:          *
200:          * @return the new adapter.
201:          * @see org.eclipse.emf.ecp.view.dynamictree.model.DynamicContainmentItem
202:          * @generated
203:          */
204:         public Adapter createDynamicContainmentItemAdapter() {
205:                 return null;
206:         }
207:
208:         /**
209:          * Creates a new adapter for an object of class '{@link org.eclipse.emf.ecp.view.dynamictree.model.TestElement
210:          * <em>Test Element</em>}'.
211:          * <!-- begin-user-doc -->
212:          * This default implementation returns null so that we can easily ignore cases;
213:          * it's useful to ignore a case when inheritance will catch all the cases anyway.
214:          * <!-- end-user-doc -->
215:          *
216:          * @return the new adapter.
217:          * @see org.eclipse.emf.ecp.view.dynamictree.model.TestElement
218:          * @generated
219:          */
220:         public Adapter createTestElementAdapter() {
221:                 return null;
222:         }
223:
224:         /**
225:          * Creates a new adapter for an object of class '{@link org.eclipse.emf.ecp.view.dynamictree.model.DomainRoot
226:          * <em>Domain Root</em>}'.
227:          * <!-- begin-user-doc -->
228:          * This default implementation returns null so that we can easily ignore cases;
229:          * it's useful to ignore a case when inheritance will catch all the cases anyway.
230:          * <!-- end-user-doc -->
231:          *
232:          * @return the new adapter.
233:          * @see org.eclipse.emf.ecp.view.dynamictree.model.DomainRoot
234:          * @generated
235:          */
236:         public Adapter createDomainRootAdapter() {
237:                 return null;
238:         }
239:
240:         /**
241:          * Creates a new adapter for an object of class '
242:          * {@link org.eclipse.emf.ecp.view.dynamictree.model.DomainIntermediate <em>Domain Intermediate</em>}'.
243:          * <!-- begin-user-doc -->
244:          * This default implementation returns null so that we can easily ignore cases;
245:          * it's useful to ignore a case when inheritance will catch all the cases anyway.
246:          * <!-- end-user-doc -->
247:          *
248:          * @return the new adapter.
249:          * @see org.eclipse.emf.ecp.view.dynamictree.model.DomainIntermediate
250:          * @generated
251:          */
252:         public Adapter createDomainIntermediateAdapter() {
253:                 return null;
254:         }
255:
256:         /**
257:          * Creates a new adapter for an object of class '
258:          * {@link org.eclipse.emf.ecp.view.dynamictree.model.TestElementContainer <em>Test Element Container</em>}'.
259:          * <!-- begin-user-doc -->
260:          * This default implementation returns null so that we can easily ignore cases;
261:          * it's useful to ignore a case when inheritance will catch all the cases anyway.
262:          * <!-- end-user-doc -->
263:          *
264:          * @return the new adapter.
265:          * @see org.eclipse.emf.ecp.view.dynamictree.model.TestElementContainer
266:          * @generated
267:          */
268:         public Adapter createTestElementContainerAdapter() {
269:                 return null;
270:         }
271:
272:         /**
273:          * Creates a new adapter for an object of class '
274:          * {@link org.eclipse.emf.ecp.view.dynamictree.model.DynamicContainmentTreeDomainModelReference
275:          * <em>Dynamic Containment Tree Domain Model Reference</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.emf.ecp.view.dynamictree.model.DynamicContainmentTreeDomainModelReference
283:          * @generated
284:          */
285:         public Adapter createDynamicContainmentTreeDomainModelReferenceAdapter() {
286:                 return null;
287:         }
288:
289:         /**
290:          * Creates a new adapter for an object of class '{@link org.eclipse.emf.ecp.view.spi.model.VElement
291:          * <em>Element</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.emf.ecp.view.spi.model.VElement
299:          * @generated
300:          */
301:         public Adapter createElementAdapter() {
302:                 return null;
303:         }
304:
305:         /**
306:          * Creates a new adapter for an object of class '
307:          * {@link org.eclipse.emf.ecp.view.spi.categorization.model.VCategorizableElement <em>Categorizable Element</em>}'.
308:          * <!-- begin-user-doc -->
309:          * This default implementation returns null so that we can easily ignore cases;
310:          * it's useful to ignore a case when inheritance will catch all the cases anyway.
311:          * <!-- end-user-doc -->
312:          *
313:          * @return the new adapter.
314:          * @see org.eclipse.emf.ecp.view.spi.categorization.model.VCategorizableElement
315:          * @generated
316:          */
317:         public Adapter createCategorizableElementAdapter() {
318:                 return null;
319:         }
320:
321:         /**
322:          * Creates a new adapter for an object of class '
323:          * {@link org.eclipse.emf.ecp.view.spi.categorization.model.VAbstractCategorization
324:          * <em>Abstract Categorization</em>}'.
325:          * <!-- begin-user-doc -->
326:          * This default implementation returns null so that we can easily ignore cases;
327:          * it's useful to ignore a case when inheritance will catch all the cases anyway.
328:          * <!-- end-user-doc -->
329:          *
330:          * @return the new adapter.
331:          * @see org.eclipse.emf.ecp.view.spi.categorization.model.VAbstractCategorization
332:          * @generated
333:          */
334:         public Adapter createAbstractCategorizationAdapter() {
335:                 return null;
336:         }
337:
338:         /**
339:          * Creates a new adapter for an object of class '{@link org.eclipse.emf.ecp.view.spi.categorization.model.VCategory
340:          * <em>Category</em>}'.
341:          * <!-- begin-user-doc -->
342:          * This default implementation returns null so that we can easily ignore cases;
343:          * it's useful to ignore a case when inheritance will catch all the cases anyway.
344:          * <!-- end-user-doc -->
345:          *
346:          * @return the new adapter.
347:          * @see org.eclipse.emf.ecp.view.spi.categorization.model.VCategory
348:          * @generated
349:          */
350:         public Adapter createCategoryAdapter() {
351:                 return null;
352:         }
353:
354:         /**
355:          * Creates a new adapter for an object of class '{@link org.eclipse.emf.ecp.view.spi.model.VDomainModelReference
356:          * <em>Domain Model Reference</em>}'.
357:          * <!-- begin-user-doc -->
358:          * This default implementation returns null so that we can easily ignore cases;
359:          * it's useful to ignore a case when inheritance will catch all the cases anyway.
360:          * <!-- end-user-doc -->
361:          *
362:          * @return the new adapter.
363:          * @see org.eclipse.emf.ecp.view.spi.model.VDomainModelReference
364:          * @generated
365:          */
366:         public Adapter createDomainModelReferenceAdapter() {
367:                 return null;
368:         }
369:
370:         /**
371:          * Creates a new adapter for the default case.
372:          * <!-- begin-user-doc -->
373:          * This default implementation returns null.
374:          * <!-- end-user-doc -->
375:          *
376:          * @return the new adapter.
377:          * @generated
378:          */
379:         public Adapter createEObjectAdapter() {
380:                 return null;
381:         }
382:
383: } // ModelAdapterFactory