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

COVERAGE SUMMARY FOR SOURCE FILE [CompositeEventImpl.java]

nameclass, %method, %block, %line, %
CompositeEventImpl.java100% (1/1)62%  (5/8)51%  (45/89)45%  (11.8/26)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class CompositeEventImpl100% (1/1)62%  (5/8)51%  (45/89)45%  (11.8/26)
eInverseRemove (InternalEObject, int, NotificationChain): NotificationChain 0%   (0/1)0%   (0/15)0%   (0/3)
eSet (int, Object): void 0%   (0/1)0%   (0/17)0%   (0/6)
eUnset (int): void 0%   (0/1)0%   (0/10)0%   (0/5)
eIsSet (int): boolean 100% (1/1)88%  (15/17)94%  (2.8/3)
CompositeEventImpl (): void 100% (1/1)100% (3/3)100% (2/2)
eGet (int, boolean, boolean): Object 100% (1/1)100% (11/11)100% (3/3)
eStaticClass (): EClass 100% (1/1)100% (2/2)100% (1/1)
getParts (): 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.CompositeEvent;
10import com.hammurapi.eventbus.snapshot.Event;
11import com.hammurapi.eventbus.snapshot.SnapshotPackage;
12 
13import java.util.Collection;
14import org.eclipse.emf.common.notify.Notification;
15import org.eclipse.emf.common.notify.NotificationChain;
16 
17import org.eclipse.emf.common.util.EList;
18import org.eclipse.emf.ecore.EClass;
19import org.eclipse.emf.ecore.InternalEObject;
20 
21import org.eclipse.emf.ecore.util.EObjectContainmentEList;
22import org.eclipse.emf.ecore.util.InternalEList;
23import org.eclipse.emf.ecore.impl.ENotificationImpl;
24 
25/**
26 * <!-- begin-user-doc -->
27 * An implementation of the model object '<em><b>Composite Event</b></em>'.
28 * <!-- end-user-doc -->
29 * <p>
30 * The following features are implemented:
31 * <ul>
32 *   <li>{@link com.hammurapi.eventbus.snapshot.impl.CompositeEventImpl#getParts <em>Parts</em>}</li>
33 * </ul>
34 * </p>
35 *
36 * @generated
37 */
38public class CompositeEventImpl extends EventImpl implements CompositeEvent {
39        /**
40         * The cached value of the '{@link #getParts() <em>Parts</em>}' containment reference list.
41         * <!-- begin-user-doc -->
42         * <!-- end-user-doc -->
43         * @see #getParts()
44         * @generated
45         * @ordered
46         */
47        protected EList<Event> parts;
48 
49        /**
50         * <!-- begin-user-doc -->
51         * <!-- end-user-doc -->
52         * @generated
53         */
54        protected CompositeEventImpl() {
55                super();
56        }
57 
58        /**
59         * <!-- begin-user-doc -->
60         * <!-- end-user-doc -->
61         * @generated
62         */
63        @Override
64        protected EClass eStaticClass() {
65                return SnapshotPackage.Literals.COMPOSITE_EVENT;
66        }
67 
68        /**
69         * <!-- begin-user-doc -->
70         * <!-- end-user-doc -->
71         * @generated
72         */
73        public EList<Event> getParts() {
74                if (parts == null) {
75                        parts = new EObjectContainmentEList<Event>(Event.class, this, SnapshotPackage.COMPOSITE_EVENT__PARTS);
76                }
77                return parts;
78        }
79 
80        /**
81         * <!-- begin-user-doc -->
82         * <!-- end-user-doc -->
83         * @generated
84         */
85        @Override
86        public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
87                switch (featureID) {
88                        case SnapshotPackage.COMPOSITE_EVENT__PARTS:
89                                return ((InternalEList<?>)getParts()).basicRemove(otherEnd, msgs);
90                }
91                return super.eInverseRemove(otherEnd, featureID, msgs);
92        }
93 
94        /**
95         * <!-- begin-user-doc -->
96         * <!-- end-user-doc -->
97         * @generated
98         */
99        @Override
100        public Object eGet(int featureID, boolean resolve, boolean coreType) {
101                switch (featureID) {
102                        case SnapshotPackage.COMPOSITE_EVENT__PARTS:
103                                return getParts();
104                }
105                return super.eGet(featureID, resolve, coreType);
106        }
107 
108        /**
109         * <!-- begin-user-doc -->
110         * <!-- end-user-doc -->
111         * @generated
112         */
113        @SuppressWarnings("unchecked")
114        @Override
115        public void eSet(int featureID, Object newValue) {
116                switch (featureID) {
117                        case SnapshotPackage.COMPOSITE_EVENT__PARTS:
118                                getParts().clear();
119                                getParts().addAll((Collection<? extends Event>)newValue);
120                                return;
121                }
122                super.eSet(featureID, newValue);
123        }
124 
125        /**
126         * <!-- begin-user-doc -->
127         * <!-- end-user-doc -->
128         * @generated
129         */
130        @Override
131        public void eUnset(int featureID) {
132                switch (featureID) {
133                        case SnapshotPackage.COMPOSITE_EVENT__PARTS:
134                                getParts().clear();
135                                return;
136                }
137                super.eUnset(featureID);
138        }
139 
140        /**
141         * <!-- begin-user-doc -->
142         * <!-- end-user-doc -->
143         * @generated
144         */
145        @Override
146        public boolean eIsSet(int featureID) {
147                switch (featureID) {
148                        case SnapshotPackage.COMPOSITE_EVENT__PARTS:
149                                return parts != null && !parts.isEmpty();
150                }
151                return super.eIsSet(featureID);
152        }
153 
154} //CompositeEventImpl

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