EMMA Coverage Report (generated Sun Feb 05 10:43:15 CET 2012)
[all classes][QVTBase.impl]

COVERAGE SUMMARY FOR SOURCE FILE [PatternImpl.java]

nameclass, %method, %block, %line, %
PatternImpl.java0%   (0/1)0%   (0/10)0%   (0/147)0%   (0/39)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class PatternImpl0%   (0/1)0%   (0/10)0%   (0/147)0%   (0/39)
PatternImpl (): void 0%   (0/1)0%   (0/3)0%   (0/2)
eGet (int, boolean, boolean): Object 0%   (0/1)0%   (0/14)0%   (0/4)
eInverseAdd (InternalEObject, int, NotificationChain): NotificationChain 0%   (0/1)0%   (0/15)0%   (0/3)
eInverseRemove (InternalEObject, int, NotificationChain): NotificationChain 0%   (0/1)0%   (0/15)0%   (0/3)
eIsSet (int): boolean 0%   (0/1)0%   (0/28)0%   (0/4)
eSet (int, Object): void 0%   (0/1)0%   (0/27)0%   (0/9)
eStaticClass (): EClass 0%   (0/1)0%   (0/2)0%   (0/1)
eUnset (int): void 0%   (0/1)0%   (0/14)0%   (0/7)
getBindsTo (): EList 0%   (0/1)0%   (0/14)0%   (0/3)
getPredicate (): EList 0%   (0/1)0%   (0/15)0%   (0/3)

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

[all classes][QVTBase.impl]
EMMA 2.0.9414 (unsupported private build) (C) Vladimir Roubtsov