|
1 /* |
|
2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of the License "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 |
|
18 package com.nokia.carbide.cpp.internal.pi.util.config.gen.PIConfig.util; |
|
19 |
|
20 import org.eclipse.emf.common.notify.Adapter; |
|
21 import org.eclipse.emf.common.notify.Notifier; |
|
22 import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; |
|
23 import org.eclipse.emf.ecore.EObject; |
|
24 |
|
25 import com.nokia.carbide.cpp.internal.pi.util.config.gen.PIConfig.ButtonEventProfileListType; |
|
26 import com.nokia.carbide.cpp.internal.pi.util.config.gen.PIConfig.ButtonEventProfileType; |
|
27 import com.nokia.carbide.cpp.internal.pi.util.config.gen.PIConfig.DocumentRoot; |
|
28 import com.nokia.carbide.cpp.internal.pi.util.config.gen.PIConfig.MappingType; |
|
29 import com.nokia.carbide.cpp.internal.pi.util.config.gen.PIConfig.PIConfigPackage; |
|
30 |
|
31 /** |
|
32 * <!-- begin-user-doc --> |
|
33 * The <b>Adapter Factory</b> for the model. |
|
34 * It provides an adapter <code>createXXX</code> method for each class of the model. |
|
35 * <!-- end-user-doc --> |
|
36 * @see com.nokia.carbide.cpp.pi.util.config.gen.PIConfig.PIConfigPackage |
|
37 * @generated |
|
38 */ |
|
39 public class PIConfigAdapterFactory extends AdapterFactoryImpl { |
|
40 /** |
|
41 * The cached model package. |
|
42 * <!-- begin-user-doc --> |
|
43 * <!-- end-user-doc --> |
|
44 * @generated |
|
45 */ |
|
46 protected static PIConfigPackage modelPackage; |
|
47 |
|
48 /** |
|
49 * Creates an instance of the adapter factory. |
|
50 * <!-- begin-user-doc --> |
|
51 * <!-- end-user-doc --> |
|
52 * @generated |
|
53 */ |
|
54 public PIConfigAdapterFactory() { |
|
55 if (modelPackage == null) { |
|
56 modelPackage = PIConfigPackage.eINSTANCE; |
|
57 } |
|
58 } |
|
59 |
|
60 /** |
|
61 * Returns whether this factory is applicable for the type of the object. |
|
62 * <!-- begin-user-doc --> |
|
63 * This implementation returns <code>true</code> if the object is either the model's package or is an instance object of the model. |
|
64 * <!-- end-user-doc --> |
|
65 * @return whether this factory is applicable for the type of the object. |
|
66 * @generated |
|
67 */ |
|
68 @Override |
|
69 public boolean isFactoryForType(Object object) { |
|
70 if (object == modelPackage) { |
|
71 return true; |
|
72 } |
|
73 if (object instanceof EObject) { |
|
74 return ((EObject)object).eClass().getEPackage() == modelPackage; |
|
75 } |
|
76 return false; |
|
77 } |
|
78 |
|
79 /** |
|
80 * The switch that delegates to the <code>createXXX</code> methods. |
|
81 * <!-- begin-user-doc --> |
|
82 * <!-- end-user-doc --> |
|
83 * @generated |
|
84 */ |
|
85 protected PIConfigSwitch<Adapter> modelSwitch = |
|
86 new PIConfigSwitch<Adapter>() { |
|
87 @Override |
|
88 public Adapter caseButtonEventProfileListType(ButtonEventProfileListType object) { |
|
89 return createButtonEventProfileListTypeAdapter(); |
|
90 } |
|
91 @Override |
|
92 public Adapter caseButtonEventProfileType(ButtonEventProfileType object) { |
|
93 return createButtonEventProfileTypeAdapter(); |
|
94 } |
|
95 @Override |
|
96 public Adapter caseDocumentRoot(DocumentRoot object) { |
|
97 return createDocumentRootAdapter(); |
|
98 } |
|
99 @Override |
|
100 public Adapter caseMappingType(MappingType object) { |
|
101 return createMappingTypeAdapter(); |
|
102 } |
|
103 @Override |
|
104 public Adapter defaultCase(EObject object) { |
|
105 return createEObjectAdapter(); |
|
106 } |
|
107 }; |
|
108 |
|
109 /** |
|
110 * Creates an adapter for the <code>target</code>. |
|
111 * <!-- begin-user-doc --> |
|
112 * <!-- end-user-doc --> |
|
113 * @param target the object to adapt. |
|
114 * @return the adapter for the <code>target</code>. |
|
115 * @generated |
|
116 */ |
|
117 @Override |
|
118 public Adapter createAdapter(Notifier target) { |
|
119 return modelSwitch.doSwitch((EObject)target); |
|
120 } |
|
121 |
|
122 |
|
123 /** |
|
124 * Creates a new adapter for an object of class '{@link com.nokia.carbide.cpp.pi.util.config.gen.PIConfig.ButtonEventProfileListType <em>Button Event Profile List Type</em>}'. |
|
125 * <!-- begin-user-doc --> |
|
126 * This default implementation returns null so that we can easily ignore cases; |
|
127 * it's useful to ignore a case when inheritance will catch all the cases anyway. |
|
128 * <!-- end-user-doc --> |
|
129 * @return the new adapter. |
|
130 * @see com.nokia.carbide.cpp.pi.util.config.gen.PIConfig.ButtonEventProfileListType |
|
131 * @generated |
|
132 */ |
|
133 public Adapter createButtonEventProfileListTypeAdapter() { |
|
134 return null; |
|
135 } |
|
136 |
|
137 /** |
|
138 * Creates a new adapter for an object of class '{@link com.nokia.carbide.cpp.pi.util.config.gen.PIConfig.ButtonEventProfileType <em>Button Event Profile Type</em>}'. |
|
139 * <!-- begin-user-doc --> |
|
140 * This default implementation returns null so that we can easily ignore cases; |
|
141 * it's useful to ignore a case when inheritance will catch all the cases anyway. |
|
142 * <!-- end-user-doc --> |
|
143 * @return the new adapter. |
|
144 * @see com.nokia.carbide.cpp.pi.util.config.gen.PIConfig.ButtonEventProfileType |
|
145 * @generated |
|
146 */ |
|
147 public Adapter createButtonEventProfileTypeAdapter() { |
|
148 return null; |
|
149 } |
|
150 |
|
151 /** |
|
152 * Creates a new adapter for an object of class '{@link com.nokia.carbide.cpp.pi.util.config.gen.PIConfig.DocumentRoot <em>Document Root</em>}'. |
|
153 * <!-- begin-user-doc --> |
|
154 * This default implementation returns null so that we can easily ignore cases; |
|
155 * it's useful to ignore a case when inheritance will catch all the cases anyway. |
|
156 * <!-- end-user-doc --> |
|
157 * @return the new adapter. |
|
158 * @see com.nokia.carbide.cpp.pi.util.config.gen.PIConfig.DocumentRoot |
|
159 * @generated |
|
160 */ |
|
161 public Adapter createDocumentRootAdapter() { |
|
162 return null; |
|
163 } |
|
164 |
|
165 /** |
|
166 * Creates a new adapter for an object of class '{@link com.nokia.carbide.cpp.pi.util.config.gen.PIConfig.MappingType <em>Mapping Type</em>}'. |
|
167 * <!-- begin-user-doc --> |
|
168 * This default implementation returns null so that we can easily ignore cases; |
|
169 * it's useful to ignore a case when inheritance will catch all the cases anyway. |
|
170 * <!-- end-user-doc --> |
|
171 * @return the new adapter. |
|
172 * @see com.nokia.carbide.cpp.pi.util.config.gen.PIConfig.MappingType |
|
173 * @generated |
|
174 */ |
|
175 public Adapter createMappingTypeAdapter() { |
|
176 return null; |
|
177 } |
|
178 |
|
179 /** |
|
180 * Creates a new adapter for the default case. |
|
181 * <!-- begin-user-doc --> |
|
182 * This default implementation returns null. |
|
183 * <!-- end-user-doc --> |
|
184 * @return the new adapter. |
|
185 * @generated |
|
186 */ |
|
187 public Adapter createEObjectAdapter() { |
|
188 return null; |
|
189 } |
|
190 |
|
191 } //PIConfigAdapterFactory |