Skip to content

Package: RulerepositoryAdapterFactory$1

RulerepositoryAdapterFactory$1

nameinstructionbranchcomplexitylinemethod
caseRuleEntry(VRuleEntry)
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%
caseRuleRepository(VRuleRepository)
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-2016 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: * Eugen Neufeld - initial API and implementation
13: */
14: package org.eclipse.emfforms.spi.rulerepository.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.rulerepository.model.VRuleEntry;
21: import org.eclipse.emfforms.spi.rulerepository.model.VRuleRepository;
22: import org.eclipse.emfforms.spi.rulerepository.model.VRulerepositoryPackage;
23:
24: /**
25: * <!-- begin-user-doc --> The <b>Adapter Factory</b> for the model. It provides
26: * an adapter <code>createXXX</code> method for each class of the model. <!--
27: * end-user-doc -->
28: *
29: * @see org.eclipse.emfforms.spi.rulerepository.model.VRulerepositoryPackage
30: * @generated
31: */
32: public class RulerepositoryAdapterFactory extends AdapterFactoryImpl {
33:         /**
34:          * The cached model package.
35:          * <!-- begin-user-doc --> <!-- end-user-doc -->
36:          *
37:          * @generated
38:          */
39:         protected static VRulerepositoryPackage modelPackage;
40:
41:         /**
42:          * Creates an instance of the adapter factory.
43:          * <!-- begin-user-doc --> <!--
44:          * end-user-doc -->
45:          *
46:          * @generated
47:          */
48:         public RulerepositoryAdapterFactory() {
49:                 if (modelPackage == null) {
50:                         modelPackage = VRulerepositoryPackage.eINSTANCE;
51:                 }
52:         }
53:
54:         /**
55:          * Returns whether this factory is applicable for the type of the object.
56:          * <!-- begin-user-doc --> This implementation returns <code>true</code> if
57:          * the object is either the model's package or is an instance object of the
58:          * model. <!-- end-user-doc -->
59:          *
60:          * @return whether this factory is applicable for the type of the object.
61:          * @generated
62:          */
63:         @Override
64:         public boolean isFactoryForType(Object object) {
65:                 if (object == modelPackage) {
66:                         return true;
67:                 }
68:                 if (object instanceof EObject) {
69:                         return ((EObject) object).eClass().getEPackage() == modelPackage;
70:                 }
71:                 return false;
72:         }
73:
74:         /**
75:          * The switch that delegates to the <code>createXXX</code> methods. <!--
76:          * begin-user-doc --> <!-- end-user-doc -->
77:          *
78:          * @generated
79:          */
80:         protected RulerepositorySwitch<Adapter> modelSwitch = new RulerepositorySwitch<Adapter>() {
81:                 @Override
82:                 public Adapter caseRuleRepository(VRuleRepository object) {
83:                         return createRuleRepositoryAdapter();
84:                 }
85:
86:                 @Override
87:                 public Adapter caseRuleEntry(VRuleEntry object) {
88:                         return createRuleEntryAdapter();
89:                 }
90:
91:                 @Override
92:                 public Adapter defaultCase(EObject object) {
93:                         return createEObjectAdapter();
94:                 }
95:         };
96:
97:         /**
98:          * Creates an adapter for the <code>target</code>.
99:          * <!-- begin-user-doc -->
100:          * <!-- end-user-doc -->
101:          *
102:          * @param target the object to adapt.
103:          * @return the adapter for the <code>target</code>.
104:          * @generated
105:          */
106:         @Override
107:         public Adapter createAdapter(Notifier target) {
108:                 return modelSwitch.doSwitch((EObject) target);
109:         }
110:
111:         /**
112:          * Creates a new adapter for an object of class
113:          * '{@link org.eclipse.emfforms.spi.rulerepository.model.VRuleRepository <em>Rule Repository</em>}'.
114:          * <!-- begin-user-doc --> This default
115:          * implementation returns null so that we can easily ignore cases; it's
116:          * useful to ignore a case when inheritance will catch all the cases anyway.
117:          * <!-- end-user-doc -->
118:          *
119:          * @return the new adapter.
120:          * @see org.eclipse.emfforms.spi.rulerepository.model.VRuleRepository
121:          * @generated
122:          */
123:         public Adapter createRuleRepositoryAdapter() {
124:                 return null;
125:         }
126:
127:         /**
128:          * Creates a new adapter for an object of class '{@link org.eclipse.emfforms.spi.rulerepository.model.VRuleEntry
129:          * <em>Rule Entry</em>}'.
130:          * <!-- begin-user-doc --> This default
131:          * implementation returns null so that we can easily ignore cases; it's
132:          * useful to ignore a case when inheritance will catch all the cases anyway.
133:          * <!-- end-user-doc -->
134:          *
135:          * @return the new adapter.
136:          * @see org.eclipse.emfforms.spi.rulerepository.model.VRuleEntry
137:          * @generated
138:          */
139:         public Adapter createRuleEntryAdapter() {
140:                 return null;
141:         }
142:
143:         /**
144:          * Creates a new adapter for the default case.
145:          * <!-- begin-user-doc --> This
146:          * default implementation returns null. <!-- end-user-doc -->
147:          *
148:          * @return the new adapter.
149:          * @generated
150:          */
151:         public Adapter createEObjectAdapter() {
152:                 return null;
153:         }
154:
155: } // RulerepositoryAdapterFactory