EMMA Coverage Report (generated Sun Feb 05 10:43:15 CET 2012)
[all classes][de.uka.ipd.sdq.pcm.qosannotations.qos_performance.provider]

COVERAGE SUMMARY FOR SOURCE FILE [Qos_performanceItemProviderAdapterFactory.java]

nameclass, %method, %block, %line, %
Qos_performanceItemProviderAdapterFactory.java0%   (0/1)0%   (0/12)0%   (0/149)0%   (0/36)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class Qos_performanceItemProviderAdapterFactory0%   (0/1)0%   (0/12)0%   (0/149)0%   (0/36)
Qos_performanceItemProviderAdapterFactory (): void 0%   (0/1)0%   (0/38)0%   (0/9)
adapt (Notifier, Object): Adapter 0%   (0/1)0%   (0/5)0%   (0/1)
adapt (Object, Object): Object 0%   (0/1)0%   (0/21)0%   (0/5)
addListener (INotifyChangedListener): void 0%   (0/1)0%   (0/5)0%   (0/2)
createComponentSpecifiedExecutionTimeAdapter (): Adapter 0%   (0/1)0%   (0/12)0%   (0/3)
createSystemSpecifiedExecutionTimeAdapter (): Adapter 0%   (0/1)0%   (0/12)0%   (0/3)
dispose (): void 0%   (0/1)0%   (0/13)0%   (0/3)
fireNotifyChanged (Notification): void 0%   (0/1)0%   (0/12)0%   (0/4)
getRootAdapterFactory (): ComposeableAdapterFactory 0%   (0/1)0%   (0/9)0%   (0/1)
isFactoryForType (Object): boolean 0%   (0/1)0%   (0/13)0%   (0/1)
removeListener (INotifyChangedListener): void 0%   (0/1)0%   (0/5)0%   (0/2)
setParentAdapterFactory (ComposedAdapterFactory): void 0%   (0/1)0%   (0/4)0%   (0/2)

1/**
2 * Copyright 2005-2009 by SDQ, IPD, University of Karlsruhe, Germany
3 *
4 * $Id$
5 */
6package de.uka.ipd.sdq.pcm.qosannotations.qos_performance.provider;
7 
8import java.util.ArrayList;
9import java.util.Collection;
10 
11import org.eclipse.emf.common.notify.Adapter;
12import org.eclipse.emf.common.notify.Notification;
13import org.eclipse.emf.common.notify.Notifier;
14import org.eclipse.emf.edit.provider.ChangeNotifier;
15import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
16import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
17import org.eclipse.emf.edit.provider.IChangeNotifier;
18import org.eclipse.emf.edit.provider.IDisposable;
19import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
20import org.eclipse.emf.edit.provider.IItemLabelProvider;
21import org.eclipse.emf.edit.provider.IItemPropertySource;
22import org.eclipse.emf.edit.provider.INotifyChangedListener;
23import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
24import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
25 
26import de.uka.ipd.sdq.pcm.qosannotations.qos_performance.util.Qos_performanceAdapterFactory;
27 
28/**
29 * This is the factory that is used to provide the interfaces needed to support Viewers.
30 * The adapters generated by this factory convert EMF adapter notifications into calls to {@link #fireNotifyChanged fireNotifyChanged}.
31 * The adapters also support Eclipse property sheets.
32 * Note that most of the adapters are shared among multiple instances.
33 * <!-- begin-user-doc -->
34 * <!-- end-user-doc -->
35 * @generated
36 */
37public class Qos_performanceItemProviderAdapterFactory extends Qos_performanceAdapterFactory implements ComposeableAdapterFactory, IChangeNotifier, IDisposable {
38        /**
39         * <!-- begin-user-doc -->
40         * <!-- end-user-doc -->
41         * @generated
42         */
43        public static final String copyright = "Copyright 2005-2009 by SDQ, IPD, University of Karlsruhe, Germany";
44 
45        /**
46         * This keeps track of the root adapter factory that delegates to this adapter factory.
47         * <!-- begin-user-doc -->
48         * <!-- end-user-doc -->
49         * @generated
50         */
51        protected ComposedAdapterFactory parentAdapterFactory;
52 
53        /**
54         * This is used to implement {@link org.eclipse.emf.edit.provider.IChangeNotifier}.
55         * <!-- begin-user-doc -->
56         * <!-- end-user-doc -->
57         * @generated
58         */
59        protected IChangeNotifier changeNotifier = new ChangeNotifier();
60 
61        /**
62         * This keeps track of all the supported types checked by {@link #isFactoryForType isFactoryForType}.
63         * <!-- begin-user-doc -->
64         * <!-- end-user-doc -->
65         * @generated
66         */
67        protected Collection<Object> supportedTypes = new ArrayList<Object>();
68 
69        /**
70         * This constructs an instance.
71         * <!-- begin-user-doc -->
72         * <!-- end-user-doc -->
73         * @generated
74         */
75        public Qos_performanceItemProviderAdapterFactory() {
76                supportedTypes.add(IEditingDomainItemProvider.class);
77                supportedTypes.add(IStructuredItemContentProvider.class);
78                supportedTypes.add(ITreeItemContentProvider.class);
79                supportedTypes.add(IItemLabelProvider.class);
80                supportedTypes.add(IItemPropertySource.class);
81        }
82 
83        /**
84         * This keeps track of the one adapter used for all {@link de.uka.ipd.sdq.pcm.qosannotations.qos_performance.SystemSpecifiedExecutionTime} instances.
85         * <!-- begin-user-doc -->
86         * <!-- end-user-doc -->
87         * @generated
88         */
89        protected SystemSpecifiedExecutionTimeItemProvider systemSpecifiedExecutionTimeItemProvider;
90 
91        /**
92         * This creates an adapter for a {@link de.uka.ipd.sdq.pcm.qosannotations.qos_performance.SystemSpecifiedExecutionTime}.
93         * <!-- begin-user-doc -->
94         * <!-- end-user-doc -->
95         * @generated
96         */
97        @Override
98        public Adapter createSystemSpecifiedExecutionTimeAdapter() {
99                if (systemSpecifiedExecutionTimeItemProvider == null) {
100                        systemSpecifiedExecutionTimeItemProvider = new SystemSpecifiedExecutionTimeItemProvider(this);
101                }
102 
103                return systemSpecifiedExecutionTimeItemProvider;
104        }
105 
106        /**
107         * This keeps track of the one adapter used for all {@link de.uka.ipd.sdq.pcm.qosannotations.qos_performance.ComponentSpecifiedExecutionTime} instances.
108         * <!-- begin-user-doc -->
109         * <!-- end-user-doc -->
110         * @generated
111         */
112        protected ComponentSpecifiedExecutionTimeItemProvider componentSpecifiedExecutionTimeItemProvider;
113 
114        /**
115         * This creates an adapter for a {@link de.uka.ipd.sdq.pcm.qosannotations.qos_performance.ComponentSpecifiedExecutionTime}.
116         * <!-- begin-user-doc -->
117         * <!-- end-user-doc -->
118         * @generated
119         */
120        @Override
121        public Adapter createComponentSpecifiedExecutionTimeAdapter() {
122                if (componentSpecifiedExecutionTimeItemProvider == null) {
123                        componentSpecifiedExecutionTimeItemProvider = new ComponentSpecifiedExecutionTimeItemProvider(this);
124                }
125 
126                return componentSpecifiedExecutionTimeItemProvider;
127        }
128 
129        /**
130         * This returns the root adapter factory that contains this factory.
131         * <!-- begin-user-doc -->
132         * <!-- end-user-doc -->
133         * @generated
134         */
135        public ComposeableAdapterFactory getRootAdapterFactory() {
136                return parentAdapterFactory == null ? this : parentAdapterFactory.getRootAdapterFactory();
137        }
138 
139        /**
140         * This sets the composed adapter factory that contains this factory.
141         * <!-- begin-user-doc -->
142         * <!-- end-user-doc -->
143         * @generated
144         */
145        public void setParentAdapterFactory(ComposedAdapterFactory parentAdapterFactory) {
146                this.parentAdapterFactory = parentAdapterFactory;
147        }
148 
149        /**
150         * <!-- begin-user-doc -->
151         * <!-- end-user-doc -->
152         * @generated
153         */
154        @Override
155        public boolean isFactoryForType(Object type) {
156                return supportedTypes.contains(type) || super.isFactoryForType(type);
157        }
158 
159        /**
160         * This implementation substitutes the factory itself as the key for the adapter.
161         * <!-- begin-user-doc -->
162         * <!-- end-user-doc -->
163         * @generated
164         */
165        @Override
166        public Adapter adapt(Notifier notifier, Object type) {
167                return super.adapt(notifier, this);
168        }
169 
170        /**
171         * <!-- begin-user-doc -->
172         * <!-- end-user-doc -->
173         * @generated
174         */
175        @Override
176        public Object adapt(Object object, Object type) {
177                if (isFactoryForType(type)) {
178                        Object adapter = super.adapt(object, type);
179                        if (!(type instanceof Class<?>) || (((Class<?>)type).isInstance(adapter))) {
180                                return adapter;
181                        }
182                }
183 
184                return null;
185        }
186 
187        /**
188         * This adds a listener.
189         * <!-- begin-user-doc -->
190         * <!-- end-user-doc -->
191         * @generated
192         */
193        public void addListener(INotifyChangedListener notifyChangedListener) {
194                changeNotifier.addListener(notifyChangedListener);
195        }
196 
197        /**
198         * This removes a listener.
199         * <!-- begin-user-doc -->
200         * <!-- end-user-doc -->
201         * @generated
202         */
203        public void removeListener(INotifyChangedListener notifyChangedListener) {
204                changeNotifier.removeListener(notifyChangedListener);
205        }
206 
207        /**
208         * This delegates to {@link #changeNotifier} and to {@link #parentAdapterFactory}.
209         * <!-- begin-user-doc -->
210         * <!-- end-user-doc -->
211         * @generated
212         */
213        public void fireNotifyChanged(Notification notification) {
214                changeNotifier.fireNotifyChanged(notification);
215 
216                if (parentAdapterFactory != null) {
217                        parentAdapterFactory.fireNotifyChanged(notification);
218                }
219        }
220 
221        /**
222         * This disposes all of the item providers created by this factory. 
223         * <!-- begin-user-doc -->
224         * <!-- end-user-doc -->
225         * @generated
226         */
227        public void dispose() {
228                if (systemSpecifiedExecutionTimeItemProvider != null) systemSpecifiedExecutionTimeItemProvider.dispose();
229                if (componentSpecifiedExecutionTimeItemProvider != null) componentSpecifiedExecutionTimeItemProvider.dispose();
230        }
231 
232}

[all classes][de.uka.ipd.sdq.pcm.qosannotations.qos_performance.provider]
EMMA 2.0.9414 (unsupported private build) (C) Vladimir Roubtsov