1 | /** |
2 | * <copyright> |
3 | * </copyright> |
4 | * |
5 | * $Id$ |
6 | */ |
7 | package de.uka.ipd.sdq.pcm.resultdecorator.util; |
8 | |
9 | import de.uka.ipd.sdq.pcm.resultdecorator.*; |
10 | |
11 | import org.eclipse.emf.common.notify.Adapter; |
12 | import org.eclipse.emf.common.notify.Notifier; |
13 | |
14 | import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; |
15 | |
16 | import org.eclipse.emf.ecore.EObject; |
17 | |
18 | /** |
19 | * <!-- begin-user-doc --> |
20 | * The <b>Adapter Factory</b> for the model. |
21 | * It provides an adapter <code>createXXX</code> method for each class of the model. |
22 | * <!-- end-user-doc --> |
23 | * @see de.uka.ipd.sdq.pcm.resultdecorator.ResultdecoratorPackage |
24 | * @generated |
25 | */ |
26 | public class ResultdecoratorAdapterFactory extends AdapterFactoryImpl { |
27 | /** |
28 | * The cached model package. |
29 | * <!-- begin-user-doc --> |
30 | * <!-- end-user-doc --> |
31 | * @generated |
32 | */ |
33 | protected static ResultdecoratorPackage modelPackage; |
34 | |
35 | /** |
36 | * Creates an instance of the adapter factory. |
37 | * <!-- begin-user-doc --> |
38 | * <!-- end-user-doc --> |
39 | * @generated |
40 | */ |
41 | public ResultdecoratorAdapterFactory() { |
42 | if (modelPackage == null) { |
43 | modelPackage = ResultdecoratorPackage.eINSTANCE; |
44 | } |
45 | } |
46 | |
47 | /** |
48 | * Returns whether this factory is applicable for the type of the object. |
49 | * <!-- begin-user-doc --> |
50 | * This implementation returns <code>true</code> if the object is either the model's package or is an instance object of the model. |
51 | * <!-- end-user-doc --> |
52 | * @return whether this factory is applicable for the type of the object. |
53 | * @generated |
54 | */ |
55 | @Override |
56 | public boolean isFactoryForType(Object object) { |
57 | if (object == modelPackage) { |
58 | return true; |
59 | } |
60 | if (object instanceof EObject) { |
61 | return ((EObject)object).eClass().getEPackage() == modelPackage; |
62 | } |
63 | return false; |
64 | } |
65 | |
66 | /** |
67 | * The switch the delegates to the <code>createXXX</code> methods. |
68 | * <!-- begin-user-doc --> |
69 | * <!-- end-user-doc --> |
70 | * @generated |
71 | */ |
72 | protected ResultdecoratorSwitch<Adapter> modelSwitch = |
73 | new ResultdecoratorSwitch<Adapter>() { |
74 | @Override |
75 | public Adapter caseResultDecoratorRepository(ResultDecoratorRepository object) { |
76 | return createResultDecoratorRepositoryAdapter(); |
77 | } |
78 | @Override |
79 | public Adapter defaultCase(EObject object) { |
80 | return createEObjectAdapter(); |
81 | } |
82 | }; |
83 | |
84 | /** |
85 | * Creates an adapter for the <code>target</code>. |
86 | * <!-- begin-user-doc --> |
87 | * <!-- end-user-doc --> |
88 | * @param target the object to adapt. |
89 | * @return the adapter for the <code>target</code>. |
90 | * @generated |
91 | */ |
92 | @Override |
93 | public Adapter createAdapter(Notifier target) { |
94 | return modelSwitch.doSwitch((EObject)target); |
95 | } |
96 | |
97 | |
98 | /** |
99 | * Creates a new adapter for an object of class '{@link de.uka.ipd.sdq.pcm.resultdecorator.ResultDecoratorRepository <em>Result Decorator Repository</em>}'. |
100 | * <!-- begin-user-doc --> |
101 | * This default implementation returns null so that we can easily ignore cases; |
102 | * it's useful to ignore a case when inheritance will catch all the cases anyway. |
103 | * <!-- end-user-doc --> |
104 | * @return the new adapter. |
105 | * @see de.uka.ipd.sdq.pcm.resultdecorator.ResultDecoratorRepository |
106 | * @generated |
107 | */ |
108 | public Adapter createResultDecoratorRepositoryAdapter() { |
109 | return null; |
110 | } |
111 | |
112 | /** |
113 | * Creates a new adapter for the default case. |
114 | * <!-- begin-user-doc --> |
115 | * This default implementation returns null. |
116 | * <!-- end-user-doc --> |
117 | * @return the new adapter. |
118 | * @generated |
119 | */ |
120 | public Adapter createEObjectAdapter() { |
121 | return null; |
122 | } |
123 | |
124 | } //ResultdecoratorAdapterFactory |