Skip to content

Package: AuditAdapterFactory

AuditAdapterFactory

nameinstructionbranchcomplexitylinemethod
AuditAdapterFactory()
M: 13 C: 0
0%
M: 2 C: 0
0%
M: 2 C: 0
0%
M: 5 C: 0
0%
M: 1 C: 0
0%
createAdapter(Notifier)
M: 7 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
createAdminUserAdapter()
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%
createBotAdapter()
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%
createGuestUserAdapter()
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%
createHumanAdapter()
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%
createMemberAdapter()
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%
createMemberGroupAdapter()
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%
createOrganizationAdapter()
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%
createPrivilegedBotAdapter()
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%
createPrivilegedUserAdapter()
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%
createRegisteredUserAdapter()
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: 20 C: 0
0%
M: 6 C: 0
0%
M: 4 C: 0
0%
M: 5 C: 0
0%
M: 1 C: 0
0%

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 - initial API and implementation
13: */
14: package org.eclipse.emf.ecp.view.table.ui.nebula.grid.test.model.audit.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.table.ui.nebula.grid.test.model.audit.AdminUser;
21: import org.eclipse.emf.ecp.view.table.ui.nebula.grid.test.model.audit.AuditPackage;
22: import org.eclipse.emf.ecp.view.table.ui.nebula.grid.test.model.audit.Bot;
23: import org.eclipse.emf.ecp.view.table.ui.nebula.grid.test.model.audit.GuestUser;
24: import org.eclipse.emf.ecp.view.table.ui.nebula.grid.test.model.audit.Human;
25: import org.eclipse.emf.ecp.view.table.ui.nebula.grid.test.model.audit.Member;
26: import org.eclipse.emf.ecp.view.table.ui.nebula.grid.test.model.audit.MemberGroup;
27: import org.eclipse.emf.ecp.view.table.ui.nebula.grid.test.model.audit.Organization;
28: import org.eclipse.emf.ecp.view.table.ui.nebula.grid.test.model.audit.PrivilegedBot;
29: import org.eclipse.emf.ecp.view.table.ui.nebula.grid.test.model.audit.PrivilegedUser;
30: import org.eclipse.emf.ecp.view.table.ui.nebula.grid.test.model.audit.RegisteredUser;
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.emf.ecp.view.table.ui.nebula.grid.test.model.audit.AuditPackage
39: * @generated
40: */
41: public class AuditAdapterFactory extends AdapterFactoryImpl {
42:         /**
43:          * The cached model package.
44:          * <!-- begin-user-doc -->
45:          * <!-- end-user-doc -->
46:          *
47:          * @generated
48:          */
49:         protected static AuditPackage 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 AuditAdapterFactory() {
59:•                if (modelPackage == null) {
60:                         modelPackage = AuditPackage.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 AuditSwitch<Adapter> modelSwitch = new AuditSwitch<Adapter>() {
93:                 @Override
94:                 public Adapter caseOrganization(Organization object) {
95:                         return createOrganizationAdapter();
96:                 }
97:
98:                 @Override
99:                 public Adapter caseMember(Member object) {
100:                         return createMemberAdapter();
101:                 }
102:
103:                 @Override
104:                 public Adapter caseBot(Bot object) {
105:                         return createBotAdapter();
106:                 }
107:
108:                 @Override
109:                 public Adapter caseHuman(Human object) {
110:                         return createHumanAdapter();
111:                 }
112:
113:                 @Override
114:                 public Adapter caseGuestUser(GuestUser object) {
115:                         return createGuestUserAdapter();
116:                 }
117:
118:                 @Override
119:                 public Adapter caseRegisteredUser(RegisteredUser object) {
120:                         return createRegisteredUserAdapter();
121:                 }
122:
123:                 @Override
124:                 public Adapter casePrivilegedUser(PrivilegedUser object) {
125:                         return createPrivilegedUserAdapter();
126:                 }
127:
128:                 @Override
129:                 public Adapter caseAdminUser(AdminUser object) {
130:                         return createAdminUserAdapter();
131:                 }
132:
133:                 @Override
134:                 public Adapter casePrivilegedBot(PrivilegedBot object) {
135:                         return createPrivilegedBotAdapter();
136:                 }
137:
138:                 @Override
139:                 public Adapter caseMemberGroup(MemberGroup object) {
140:                         return createMemberGroupAdapter();
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.emf.ecp.view.table.ui.nebula.grid.test.model.audit.Organization <em>Organization</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.emf.ecp.view.table.ui.nebula.grid.test.model.audit.Organization
173:          * @generated
174:          */
175:         public Adapter createOrganizationAdapter() {
176:                 return null;
177:         }
178:
179:         /**
180:          * Creates a new adapter for an object of class
181:          * '{@link org.eclipse.emf.ecp.view.table.ui.nebula.grid.test.model.audit.Member <em>Member</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.emf.ecp.view.table.ui.nebula.grid.test.model.audit.Member
189:          * @generated
190:          */
191:         public Adapter createMemberAdapter() {
192:                 return null;
193:         }
194:
195:         /**
196:          * Creates a new adapter for an object of class
197:          * '{@link org.eclipse.emf.ecp.view.table.ui.nebula.grid.test.model.audit.Bot <em>Bot</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.emf.ecp.view.table.ui.nebula.grid.test.model.audit.Bot
205:          * @generated
206:          */
207:         public Adapter createBotAdapter() {
208:                 return null;
209:         }
210:
211:         /**
212:          * Creates a new adapter for an object of class
213:          * '{@link org.eclipse.emf.ecp.view.table.ui.nebula.grid.test.model.audit.Human <em>Human</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.emf.ecp.view.table.ui.nebula.grid.test.model.audit.Human
221:          * @generated
222:          */
223:         public Adapter createHumanAdapter() {
224:                 return null;
225:         }
226:
227:         /**
228:          * Creates a new adapter for an object of class
229:          * '{@link org.eclipse.emf.ecp.view.table.ui.nebula.grid.test.model.audit.GuestUser <em>Guest User</em>}'.
230:          * <!-- begin-user-doc -->
231:          * This default implementation returns null so that we can easily ignore cases;
232:          * it's useful to ignore a case when inheritance will catch all the cases anyway.
233:          * <!-- end-user-doc -->
234:          *
235:          * @return the new adapter.
236:          * @see org.eclipse.emf.ecp.view.table.ui.nebula.grid.test.model.audit.GuestUser
237:          * @generated
238:          */
239:         public Adapter createGuestUserAdapter() {
240:                 return null;
241:         }
242:
243:         /**
244:          * Creates a new adapter for an object of class
245:          * '{@link org.eclipse.emf.ecp.view.table.ui.nebula.grid.test.model.audit.RegisteredUser <em>Registered User</em>}'.
246:          * <!-- begin-user-doc -->
247:          * This default implementation returns null so that we can easily ignore cases;
248:          * it's useful to ignore a case when inheritance will catch all the cases anyway.
249:          * <!-- end-user-doc -->
250:          *
251:          * @return the new adapter.
252:          * @see org.eclipse.emf.ecp.view.table.ui.nebula.grid.test.model.audit.RegisteredUser
253:          * @generated
254:          */
255:         public Adapter createRegisteredUserAdapter() {
256:                 return null;
257:         }
258:
259:         /**
260:          * Creates a new adapter for an object of class
261:          * '{@link org.eclipse.emf.ecp.view.table.ui.nebula.grid.test.model.audit.PrivilegedUser <em>Privileged User</em>}'.
262:          * <!-- begin-user-doc -->
263:          * This default implementation returns null so that we can easily ignore cases;
264:          * it's useful to ignore a case when inheritance will catch all the cases anyway.
265:          * <!-- end-user-doc -->
266:          *
267:          * @return the new adapter.
268:          * @see org.eclipse.emf.ecp.view.table.ui.nebula.grid.test.model.audit.PrivilegedUser
269:          * @generated
270:          */
271:         public Adapter createPrivilegedUserAdapter() {
272:                 return null;
273:         }
274:
275:         /**
276:          * Creates a new adapter for an object of class
277:          * '{@link org.eclipse.emf.ecp.view.table.ui.nebula.grid.test.model.audit.AdminUser <em>Admin User</em>}'.
278:          * <!-- begin-user-doc -->
279:          * This default implementation returns null so that we can easily ignore cases;
280:          * it's useful to ignore a case when inheritance will catch all the cases anyway.
281:          * <!-- end-user-doc -->
282:          *
283:          * @return the new adapter.
284:          * @see org.eclipse.emf.ecp.view.table.ui.nebula.grid.test.model.audit.AdminUser
285:          * @generated
286:          */
287:         public Adapter createAdminUserAdapter() {
288:                 return null;
289:         }
290:
291:         /**
292:          * Creates a new adapter for an object of class
293:          * '{@link org.eclipse.emf.ecp.view.table.ui.nebula.grid.test.model.audit.PrivilegedBot <em>Privileged Bot</em>}'.
294:          * <!-- begin-user-doc -->
295:          * This default implementation returns null so that we can easily ignore cases;
296:          * it's useful to ignore a case when inheritance will catch all the cases anyway.
297:          * <!-- end-user-doc -->
298:          *
299:          * @return the new adapter.
300:          * @see org.eclipse.emf.ecp.view.table.ui.nebula.grid.test.model.audit.PrivilegedBot
301:          * @generated
302:          */
303:         public Adapter createPrivilegedBotAdapter() {
304:                 return null;
305:         }
306:
307:         /**
308:          * Creates a new adapter for an object of class
309:          * '{@link org.eclipse.emf.ecp.view.table.ui.nebula.grid.test.model.audit.MemberGroup <em>Member Group</em>}'.
310:          * <!-- begin-user-doc -->
311:          * This default implementation returns null so that we can easily ignore cases;
312:          * it's useful to ignore a case when inheritance will catch all the cases anyway.
313:          * <!-- end-user-doc -->
314:          *
315:          * @return the new adapter.
316:          * @see org.eclipse.emf.ecp.view.table.ui.nebula.grid.test.model.audit.MemberGroup
317:          * @generated
318:          */
319:         public Adapter createMemberGroupAdapter() {
320:                 return null;
321:         }
322:
323:         /**
324:          * Creates a new adapter for the default case.
325:          * <!-- begin-user-doc -->
326:          * This default implementation returns null.
327:          * <!-- end-user-doc -->
328:          *
329:          * @return the new adapter.
330:          * @generated
331:          */
332:         public Adapter createEObjectAdapter() {
333:                 return null;
334:         }
335:
336: } // AuditAdapterFactory