EMMA Coverage Report (generated Thu Jan 20 11:39:44 EST 2011)
[all classes][com.hammurapi.eventbus.snapshot.impl]

COVERAGE SUMMARY FOR SOURCE FILE [DerivationImpl.java]

nameclass, %method, %block, %line, %
DerivationImpl.java100% (1/1)70%  (7/10)36%  (58/160)39%  (16.9/43)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class DerivationImpl100% (1/1)70%  (7/10)36%  (58/160)39%  (16.9/43)
eSet (int, Object): void 0%   (0/1)0%   (0/22)0%   (0/8)
eUnset (int): void 0%   (0/1)0%   (0/14)0%   (0/7)
getHandler (): Handler 0%   (0/1)0%   (0/38)0%   (0/7)
setHandler (Handler): void 100% (1/1)48%  (10/21)80%  (4/5)
eGet (int, boolean, boolean): Object 100% (1/1)53%  (10/19)68%  (3.4/5)
eIsSet (int): boolean 100% (1/1)67%  (16/24)63%  (2.5/4)
DerivationImpl (): void 100% (1/1)100% (3/3)100% (2/2)
basicGetHandler (): Handler 100% (1/1)100% (3/3)100% (1/1)
eStaticClass (): EClass 100% (1/1)100% (2/2)100% (1/1)
getInputs (): EList 100% (1/1)100% (14/14)100% (3/3)

1/**
2 * <copyright>
3 * </copyright>
4 *
5 * $Id$
6 */
7package com.hammurapi.eventbus.snapshot.impl;
8 
9import com.hammurapi.eventbus.snapshot.Derivation;
10import com.hammurapi.eventbus.snapshot.Event;
11import com.hammurapi.eventbus.snapshot.Handler;
12import com.hammurapi.eventbus.snapshot.SnapshotPackage;
13 
14import java.util.Collection;
15 
16import org.eclipse.emf.common.notify.Notification;
17 
18import org.eclipse.emf.common.notify.NotificationChain;
19import org.eclipse.emf.common.util.EList;
20 
21import org.eclipse.emf.ecore.EClass;
22import org.eclipse.emf.ecore.InternalEObject;
23 
24import org.eclipse.emf.ecore.impl.ENotificationImpl;
25import org.eclipse.emf.ecore.impl.EObjectImpl;
26 
27import org.eclipse.emf.ecore.util.EObjectContainmentEList;
28import org.eclipse.emf.ecore.util.InternalEList;
29import org.eclipse.emf.ecore.util.EObjectResolvingEList;
30 
31/**
32 * <!-- begin-user-doc -->
33 * An implementation of the model object '<em><b>Derivation</b></em>'.
34 * <!-- end-user-doc -->
35 * <p>
36 * The following features are implemented:
37 * <ul>
38 *   <li>{@link com.hammurapi.eventbus.snapshot.impl.DerivationImpl#getHandler <em>Handler</em>}</li>
39 *   <li>{@link com.hammurapi.eventbus.snapshot.impl.DerivationImpl#getInputs <em>Inputs</em>}</li>
40 * </ul>
41 * </p>
42 *
43 * @generated
44 */
45public class DerivationImpl extends EObjectImpl implements Derivation {
46        /**
47         * The cached value of the '{@link #getHandler() <em>Handler</em>}' reference.
48         * <!-- begin-user-doc -->
49         * <!-- end-user-doc -->
50         * @see #getHandler()
51         * @generated
52         * @ordered
53         */
54        protected Handler handler;
55 
56        /**
57         * The cached value of the '{@link #getInputs() <em>Inputs</em>}' reference list.
58         * <!-- begin-user-doc -->
59         * <!-- end-user-doc -->
60         * @see #getInputs()
61         * @generated
62         * @ordered
63         */
64        protected EList<Event> inputs;
65 
66        /**
67         * <!-- begin-user-doc -->
68         * <!-- end-user-doc -->
69         * @generated
70         */
71        protected DerivationImpl() {
72                super();
73        }
74 
75        /**
76         * <!-- begin-user-doc -->
77         * <!-- end-user-doc -->
78         * @generated
79         */
80        @Override
81        protected EClass eStaticClass() {
82                return SnapshotPackage.Literals.DERIVATION;
83        }
84 
85        /**
86         * <!-- begin-user-doc -->
87         * <!-- end-user-doc -->
88         * @generated
89         */
90        public Handler getHandler() {
91                if (handler != null && handler.eIsProxy()) {
92                        InternalEObject oldHandler = (InternalEObject)handler;
93                        handler = (Handler)eResolveProxy(oldHandler);
94                        if (handler != oldHandler) {
95                                if (eNotificationRequired())
96                                        eNotify(new ENotificationImpl(this, Notification.RESOLVE, SnapshotPackage.DERIVATION__HANDLER, oldHandler, handler));
97                        }
98                }
99                return handler;
100        }
101 
102        /**
103         * <!-- begin-user-doc -->
104         * <!-- end-user-doc -->
105         * @generated
106         */
107        public Handler basicGetHandler() {
108                return handler;
109        }
110 
111        /**
112         * <!-- begin-user-doc -->
113         * <!-- end-user-doc -->
114         * @generated
115         */
116        public void setHandler(Handler newHandler) {
117                Handler oldHandler = handler;
118                handler = newHandler;
119                if (eNotificationRequired())
120                        eNotify(new ENotificationImpl(this, Notification.SET, SnapshotPackage.DERIVATION__HANDLER, oldHandler, handler));
121        }
122 
123        /**
124         * <!-- begin-user-doc -->
125         * <!-- end-user-doc -->
126         * @generated
127         */
128        public EList<Event> getInputs() {
129                if (inputs == null) {
130                        inputs = new EObjectResolvingEList<Event>(Event.class, this, SnapshotPackage.DERIVATION__INPUTS);
131                }
132                return inputs;
133        }
134 
135        /**
136         * <!-- begin-user-doc -->
137         * <!-- end-user-doc -->
138         * @generated
139         */
140        @Override
141        public Object eGet(int featureID, boolean resolve, boolean coreType) {
142                switch (featureID) {
143                        case SnapshotPackage.DERIVATION__HANDLER:
144                                if (resolve) return getHandler();
145                                return basicGetHandler();
146                        case SnapshotPackage.DERIVATION__INPUTS:
147                                return getInputs();
148                }
149                return super.eGet(featureID, resolve, coreType);
150        }
151 
152        /**
153         * <!-- begin-user-doc -->
154         * <!-- end-user-doc -->
155         * @generated
156         */
157        @SuppressWarnings("unchecked")
158        @Override
159        public void eSet(int featureID, Object newValue) {
160                switch (featureID) {
161                        case SnapshotPackage.DERIVATION__HANDLER:
162                                setHandler((Handler)newValue);
163                                return;
164                        case SnapshotPackage.DERIVATION__INPUTS:
165                                getInputs().clear();
166                                getInputs().addAll((Collection<? extends Event>)newValue);
167                                return;
168                }
169                super.eSet(featureID, newValue);
170        }
171 
172        /**
173         * <!-- begin-user-doc -->
174         * <!-- end-user-doc -->
175         * @generated
176         */
177        @Override
178        public void eUnset(int featureID) {
179                switch (featureID) {
180                        case SnapshotPackage.DERIVATION__HANDLER:
181                                setHandler((Handler)null);
182                                return;
183                        case SnapshotPackage.DERIVATION__INPUTS:
184                                getInputs().clear();
185                                return;
186                }
187                super.eUnset(featureID);
188        }
189 
190        /**
191         * <!-- begin-user-doc -->
192         * <!-- end-user-doc -->
193         * @generated
194         */
195        @Override
196        public boolean eIsSet(int featureID) {
197                switch (featureID) {
198                        case SnapshotPackage.DERIVATION__HANDLER:
199                                return handler != null;
200                        case SnapshotPackage.DERIVATION__INPUTS:
201                                return inputs != null && !inputs.isEmpty();
202                }
203                return super.eIsSet(featureID);
204        }
205 
206} //DerivationImpl

[all classes][com.hammurapi.eventbus.snapshot.impl]
EMMA 2.0.5312 EclEmma Fix 2 (C) Vladimir Roubtsov