Skip to content

Package: RuleAdapterFactory$1

RuleAdapterFactory$1

nameinstructionbranchcomplexitylinemethod
caseAndCondition(AndCondition)
M: 0 C: 4
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
caseAttachment(VAttachment)
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%
caseCondition(Condition)
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%
caseEnableRule(EnableRule)
M: 0 C: 4
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
caseFalse(False)
M: 0 C: 4
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
caseIsProxyCondition(IsProxyCondition)
M: 0 C: 4
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
caseIterateCondition(IterateCondition)
M: 0 C: 4
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
caseLeafCondition(LeafCondition)
M: 0 C: 4
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
caseNotCondition(NotCondition)
M: 0 C: 4
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
caseOrCondition(OrCondition)
M: 0 C: 4
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
caseRule(Rule)
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%
caseShowRule(ShowRule)
M: 0 C: 4
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
caseTrue(True)
M: 0 C: 4
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
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: 0 C: 6
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%

Coverage

1: /*******************************************************************************
2: * Copyright (c) 2011-2018 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: * EclipseSource Munich GmbH - initial API and implementation
13: * Christian W. Damus - bugs 527753, 530900
14: ******************************************************************************/
15: package org.eclipse.emf.ecp.view.spi.rule.model.util;
16:
17: import org.eclipse.emf.common.notify.Adapter;
18: import org.eclipse.emf.common.notify.Notifier;
19: import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl;
20: import org.eclipse.emf.ecore.EObject;
21: import org.eclipse.emf.ecp.view.spi.model.VAttachment;
22: import org.eclipse.emf.ecp.view.spi.rule.model.AndCondition;
23: import org.eclipse.emf.ecp.view.spi.rule.model.Condition;
24: import org.eclipse.emf.ecp.view.spi.rule.model.EnableRule;
25: import org.eclipse.emf.ecp.view.spi.rule.model.False;
26: import org.eclipse.emf.ecp.view.spi.rule.model.IsProxyCondition;
27: import org.eclipse.emf.ecp.view.spi.rule.model.IterateCondition;
28: import org.eclipse.emf.ecp.view.spi.rule.model.LeafCondition;
29: import org.eclipse.emf.ecp.view.spi.rule.model.NotCondition;
30: import org.eclipse.emf.ecp.view.spi.rule.model.OrCondition;
31: import org.eclipse.emf.ecp.view.spi.rule.model.Rule;
32: import org.eclipse.emf.ecp.view.spi.rule.model.RulePackage;
33: import org.eclipse.emf.ecp.view.spi.rule.model.ShowRule;
34: import org.eclipse.emf.ecp.view.spi.rule.model.True;
35:
36: /**
37: * <!-- begin-user-doc -->
38: * The <b>Adapter Factory</b> for the model.
39: * It provides an adapter <code>createXXX</code> method for each class of the model.
40: *
41: * @since 1.2
42: * <!-- end-user-doc -->
43: * @see org.eclipse.emf.ecp.view.spi.rule.model.RulePackage
44: * @generated
45: */
46: public class RuleAdapterFactory extends AdapterFactoryImpl {
47:         /**
48:          * The cached model package.
49:          * <!-- begin-user-doc -->
50:          * <!-- end-user-doc -->
51:          *
52:          * @generated
53:          */
54:         protected static RulePackage modelPackage;
55:
56:         /**
57:          * Creates an instance of the adapter factory.
58:          * <!-- begin-user-doc -->
59:          * <!-- end-user-doc -->
60:          *
61:          * @generated
62:          */
63:         public RuleAdapterFactory() {
64:                 if (modelPackage == null) {
65:                         modelPackage = RulePackage.eINSTANCE;
66:                 }
67:         }
68:
69:         /**
70:          * Returns whether this factory is applicable for the type of the object.
71:          * <!-- begin-user-doc -->
72:          * This implementation returns <code>true</code> if the object is either the model's package or is an instance
73:          * object of the model.
74:          * <!-- end-user-doc -->
75:          *
76:          * @return whether this factory is applicable for the type of the object.
77:          * @generated
78:          */
79:         @Override
80:         public boolean isFactoryForType(Object object) {
81:                 if (object == modelPackage) {
82:                         return true;
83:                 }
84:                 if (object instanceof EObject) {
85:                         return ((EObject) object).eClass().getEPackage() == modelPackage;
86:                 }
87:                 return false;
88:         }
89:
90:         /**
91:          * The switch that delegates to the <code>createXXX</code> methods.
92:          * <!-- begin-user-doc -->
93:          * <!-- end-user-doc -->
94:          *
95:          * @generated
96:          */
97:         protected RuleSwitch<Adapter> modelSwitch = new RuleSwitch<Adapter>() {
98:                 @Override
99:                 public Adapter caseCondition(Condition object) {
100:                         return createConditionAdapter();
101:                 }
102:
103:                 @Override
104:                 public Adapter caseLeafCondition(LeafCondition object) {
105:                         return createLeafConditionAdapter();
106:                 }
107:
108:                 @Override
109:                 public Adapter caseOrCondition(OrCondition object) {
110:                         return createOrConditionAdapter();
111:                 }
112:
113:                 @Override
114:                 public Adapter caseAndCondition(AndCondition object) {
115:                         return createAndConditionAdapter();
116:                 }
117:
118:                 @Override
119:                 public Adapter caseRule(Rule object) {
120:                         return createRuleAdapter();
121:                 }
122:
123:                 @Override
124:                 public Adapter caseShowRule(ShowRule object) {
125:                         return createShowRuleAdapter();
126:                 }
127:
128:                 @Override
129:                 public Adapter caseEnableRule(EnableRule object) {
130:                         return createEnableRuleAdapter();
131:                 }
132:
133:                 @Override
134:                 public Adapter caseIterateCondition(IterateCondition object) {
135:                         return createIterateConditionAdapter();
136:                 }
137:
138:                 @Override
139:                 public Adapter caseTrue(True object) {
140:                         return createTrueAdapter();
141:                 }
142:
143:                 @Override
144:                 public Adapter caseFalse(False object) {
145:                         return createFalseAdapter();
146:                 }
147:
148:                 @Override
149:                 public Adapter caseNotCondition(NotCondition object) {
150:                         return createNotConditionAdapter();
151:                 }
152:
153:                 @Override
154:                 public Adapter caseIsProxyCondition(IsProxyCondition object) {
155:                         return createIsProxyConditionAdapter();
156:                 }
157:
158:                 @Override
159:                 public Adapter caseAttachment(VAttachment object) {
160:                         return createAttachmentAdapter();
161:                 }
162:
163:                 @Override
164:                 public Adapter defaultCase(EObject object) {
165:                         return createEObjectAdapter();
166:                 }
167:         };
168:
169:         /**
170:          * Creates an adapter for the <code>target</code>.
171:          * <!-- begin-user-doc -->
172:          * <!-- end-user-doc -->
173:          *
174:          * @param target the object to adapt.
175:          * @return the adapter for the <code>target</code>.
176:          * @generated
177:          */
178:         @Override
179:         public Adapter createAdapter(Notifier target) {
180:                 return modelSwitch.doSwitch((EObject) target);
181:         }
182:
183:         /**
184:          * Creates a new adapter for an object of class '{@link org.eclipse.emf.ecp.view.spi.rule.model.Condition
185:          * <em>Condition</em>}'.
186:          * <!-- begin-user-doc -->
187:          * This default implementation returns null so that we can easily ignore cases;
188:          * it's useful to ignore a case when inheritance will catch all the cases anyway.
189:          * <!-- end-user-doc -->
190:          *
191:          * @return the new adapter.
192:          * @see org.eclipse.emf.ecp.view.spi.rule.model.Condition
193:          * @generated
194:          */
195:         public Adapter createConditionAdapter() {
196:                 return null;
197:         }
198:
199:         /**
200:          * Creates a new adapter for an object of class '{@link org.eclipse.emf.ecp.view.spi.rule.model.LeafCondition
201:          * <em>Leaf Condition</em>}'.
202:          * <!-- begin-user-doc -->
203:          * This default implementation returns null so that we can easily ignore cases;
204:          * it's useful to ignore a case when inheritance will catch all the cases anyway.
205:          * <!-- end-user-doc -->
206:          *
207:          * @return the new adapter.
208:          * @see org.eclipse.emf.ecp.view.spi.rule.model.LeafCondition
209:          * @generated
210:          */
211:         public Adapter createLeafConditionAdapter() {
212:                 return null;
213:         }
214:
215:         /**
216:          * Creates a new adapter for an object of class '{@link org.eclipse.emf.ecp.view.spi.rule.model.OrCondition <em>Or
217:          * Condition</em>}'.
218:          * <!-- begin-user-doc -->
219:          * This default implementation returns null so that we can easily ignore cases;
220:          * it's useful to ignore a case when inheritance will catch all the cases anyway.
221:          * <!-- end-user-doc -->
222:          *
223:          * @return the new adapter.
224:          * @see org.eclipse.emf.ecp.view.spi.rule.model.OrCondition
225:          * @generated
226:          */
227:         public Adapter createOrConditionAdapter() {
228:                 return null;
229:         }
230:
231:         /**
232:          * Creates a new adapter for an object of class '{@link org.eclipse.emf.ecp.view.spi.rule.model.AndCondition <em>And
233:          * Condition</em>}'.
234:          * <!-- begin-user-doc -->
235:          * This default implementation returns null so that we can easily ignore cases;
236:          * it's useful to ignore a case when inheritance will catch all the cases anyway.
237:          * <!-- end-user-doc -->
238:          *
239:          * @return the new adapter.
240:          * @see org.eclipse.emf.ecp.view.spi.rule.model.AndCondition
241:          * @generated
242:          */
243:         public Adapter createAndConditionAdapter() {
244:                 return null;
245:         }
246:
247:         /**
248:          * Creates a new adapter for an object of class '{@link org.eclipse.emf.ecp.view.spi.rule.model.Rule
249:          * <em>Rule</em>}'.
250:          * <!-- begin-user-doc -->
251:          * This default implementation returns null so that we can easily ignore cases;
252:          * it's useful to ignore a case when inheritance will catch all the cases anyway.
253:          * <!-- end-user-doc -->
254:          *
255:          * @return the new adapter.
256:          * @see org.eclipse.emf.ecp.view.spi.rule.model.Rule
257:          * @generated
258:          */
259:         public Adapter createRuleAdapter() {
260:                 return null;
261:         }
262:
263:         /**
264:          * Creates a new adapter for an object of class '{@link org.eclipse.emf.ecp.view.spi.rule.model.ShowRule <em>Show
265:          * Rule</em>}'.
266:          * <!-- begin-user-doc -->
267:          * This default implementation returns null so that we can easily ignore cases;
268:          * it's useful to ignore a case when inheritance will catch all the cases anyway.
269:          * <!-- end-user-doc -->
270:          *
271:          * @return the new adapter.
272:          * @see org.eclipse.emf.ecp.view.spi.rule.model.ShowRule
273:          * @generated
274:          */
275:         public Adapter createShowRuleAdapter() {
276:                 return null;
277:         }
278:
279:         /**
280:          * Creates a new adapter for an object of class '{@link org.eclipse.emf.ecp.view.spi.rule.model.EnableRule
281:          * <em>Enable Rule</em>}'.
282:          * <!-- begin-user-doc -->
283:          * This default implementation returns null so that we can easily ignore cases;
284:          * it's useful to ignore a case when inheritance will catch all the cases anyway.
285:          * <!-- end-user-doc -->
286:          *
287:          * @return the new adapter.
288:          * @see org.eclipse.emf.ecp.view.spi.rule.model.EnableRule
289:          * @generated
290:          */
291:         public Adapter createEnableRuleAdapter() {
292:                 return null;
293:         }
294:
295:         /**
296:          * Creates a new adapter for an object of class '{@link org.eclipse.emf.ecp.view.spi.rule.model.IterateCondition
297:          * <em>Iterate Condition</em>}'.
298:          * <!-- begin-user-doc -->
299:          * This default implementation returns null so that we can easily ignore cases;
300:          * it's useful to ignore a case when inheritance will catch all the cases anyway.
301:          * <!-- end-user-doc -->
302:          *
303:          * @return the new adapter.
304:          * @see org.eclipse.emf.ecp.view.spi.rule.model.IterateCondition
305:          * @generated
306:          */
307:         public Adapter createIterateConditionAdapter() {
308:                 return null;
309:         }
310:
311:         /**
312:          * Creates a new adapter for an object of class '{@link org.eclipse.emf.ecp.view.spi.rule.model.True
313:          * <em>True</em>}'.
314:          * <!-- begin-user-doc -->
315:          * This default implementation returns null so that we can easily ignore cases;
316:          * it's useful to ignore a case when inheritance will catch all the cases anyway.
317:          * <!-- end-user-doc -->
318:          *
319:          * @return the new adapter.
320:          * @see org.eclipse.emf.ecp.view.spi.rule.model.True
321:          * @generated
322:          */
323:         public Adapter createTrueAdapter() {
324:                 return null;
325:         }
326:
327:         /**
328:          * Creates a new adapter for an object of class '{@link org.eclipse.emf.ecp.view.spi.rule.model.False
329:          * <em>False</em>}'.
330:          * <!-- begin-user-doc -->
331:          * This default implementation returns null so that we can easily ignore cases;
332:          * it's useful to ignore a case when inheritance will catch all the cases anyway.
333:          * <!-- end-user-doc -->
334:          *
335:          * @return the new adapter.
336:          * @see org.eclipse.emf.ecp.view.spi.rule.model.False
337:          * @generated
338:          */
339:         public Adapter createFalseAdapter() {
340:                 return null;
341:         }
342:
343:         /**
344:          * Creates a new adapter for an object of class '{@link org.eclipse.emf.ecp.view.spi.rule.model.NotCondition <em>Not
345:          * Condition</em>}'.
346:          * <!-- begin-user-doc -->
347:          * This default implementation returns null so that we can easily ignore cases;
348:          * it's useful to ignore a case when inheritance will catch all the cases anyway.
349:          * <!-- end-user-doc -->
350:          *
351:          * @return the new adapter.
352:          * @see org.eclipse.emf.ecp.view.spi.rule.model.NotCondition
353:          * @generated
354:          */
355:         public Adapter createNotConditionAdapter() {
356:                 return null;
357:         }
358:
359:         /**
360:          * Creates a new adapter for an object of class '{@link org.eclipse.emf.ecp.view.spi.rule.model.IsProxyCondition
361:          * <em>Is Proxy Condition</em>}'.
362:          * <!-- begin-user-doc -->
363:          * This default implementation returns null so that we can easily ignore cases;
364:          * it's useful to ignore a case when inheritance will catch all the cases anyway.
365:          * <!-- end-user-doc -->
366:          *
367:          * @return the new adapter.
368:          * @see org.eclipse.emf.ecp.view.spi.rule.model.IsProxyCondition
369:          * @generated
370:          */
371:         public Adapter createIsProxyConditionAdapter() {
372:                 return null;
373:         }
374:
375:         /**
376:          * Creates a new adapter for an object of class '{@link org.eclipse.emf.ecp.view.spi.model.VAttachment
377:          * <em>Attachment</em>}'.
378:          * <!-- begin-user-doc -->
379:          * This default implementation returns null so that we can easily ignore cases;
380:          * it's useful to ignore a case when inheritance will catch all the cases anyway.
381:          * <!-- end-user-doc -->
382:          *
383:          * @return the new adapter.
384:          * @see org.eclipse.emf.ecp.view.spi.model.VAttachment
385:          * @generated
386:          */
387:         public Adapter createAttachmentAdapter() {
388:                 return null;
389:         }
390:
391:         /**
392:          * Creates a new adapter for the default case.
393:          * <!-- begin-user-doc -->
394:          * This default implementation returns null.
395:          * <!-- end-user-doc -->
396:          *
397:          * @return the new adapter.
398:          * @generated
399:          */
400:         public Adapter createEObjectAdapter() {
401:                 return null;
402:         }
403:
404: } // RuleAdapterFactory