1 | /** |
2 | * Copyright 2005-2009 by SDQ, IPD, University of Karlsruhe, Germany |
3 | * |
4 | * $Id$ |
5 | */ |
6 | package de.uka.ipd.sdq.pcm.seff.impl; |
7 | |
8 | import java.util.Collection; |
9 | |
10 | import org.eclipse.emf.common.notify.NotificationChain; |
11 | import org.eclipse.emf.common.util.EList; |
12 | import org.eclipse.emf.ecore.EClass; |
13 | import org.eclipse.emf.ecore.InternalEObject; |
14 | import org.eclipse.emf.ecore.impl.EObjectImpl; |
15 | import org.eclipse.emf.ecore.util.EObjectContainmentWithInverseEList; |
16 | import org.eclipse.emf.ecore.util.InternalEList; |
17 | |
18 | import de.uka.ipd.sdq.pcm.parameter.ParameterPackage; |
19 | import de.uka.ipd.sdq.pcm.parameter.VariableUsage; |
20 | import de.uka.ipd.sdq.pcm.seff.CallAction; |
21 | import de.uka.ipd.sdq.pcm.seff.SeffPackage; |
22 | |
23 | /** |
24 | * <!-- begin-user-doc --> |
25 | * An implementation of the model object '<em><b>Call Action</b></em>'. |
26 | * <!-- end-user-doc --> |
27 | * <p> |
28 | * The following features are implemented: |
29 | * <ul> |
30 | * <li>{@link de.uka.ipd.sdq.pcm.seff.impl.CallActionImpl#getInputVariableUsages__CallAction <em>Input Variable Usages Call Action</em>}</li> |
31 | * </ul> |
32 | * </p> |
33 | * |
34 | * @generated |
35 | */ |
36 | public abstract class CallActionImpl extends EObjectImpl implements CallAction { |
37 | /** |
38 | * <!-- begin-user-doc --> |
39 | * <!-- end-user-doc --> |
40 | * @generated |
41 | */ |
42 | public static final String copyright = "Copyright 2005-2009 by SDQ, IPD, University of Karlsruhe, Germany"; |
43 | |
44 | /** |
45 | * The cached value of the '{@link #getInputVariableUsages__CallAction() <em>Input Variable Usages Call Action</em>}' containment reference list. |
46 | * <!-- begin-user-doc --> |
47 | * <!-- end-user-doc --> |
48 | * @see #getInputVariableUsages__CallAction() |
49 | * @generated |
50 | * @ordered |
51 | */ |
52 | protected EList<VariableUsage> inputVariableUsages__CallAction; |
53 | |
54 | /** |
55 | * <!-- begin-user-doc --> |
56 | * <!-- end-user-doc --> |
57 | * @generated |
58 | */ |
59 | protected CallActionImpl() { |
60 | super(); |
61 | } |
62 | |
63 | /** |
64 | * <!-- begin-user-doc --> |
65 | * <!-- end-user-doc --> |
66 | * @generated |
67 | */ |
68 | @Override |
69 | protected EClass eStaticClass() { |
70 | return SeffPackage.Literals.CALL_ACTION; |
71 | } |
72 | |
73 | /** |
74 | * <!-- begin-user-doc --> |
75 | * <!-- end-user-doc --> |
76 | * @generated |
77 | */ |
78 | public EList<VariableUsage> getInputVariableUsages__CallAction() { |
79 | if (inputVariableUsages__CallAction == null) { |
80 | inputVariableUsages__CallAction = new EObjectContainmentWithInverseEList<VariableUsage>(VariableUsage.class, this, SeffPackage.CALL_ACTION__INPUT_VARIABLE_USAGES_CALL_ACTION, ParameterPackage.VARIABLE_USAGE__CALL_ACTION_VARIABLE_USAGE); |
81 | } |
82 | return inputVariableUsages__CallAction; |
83 | } |
84 | |
85 | /** |
86 | * <!-- begin-user-doc --> |
87 | * <!-- end-user-doc --> |
88 | * @generated |
89 | */ |
90 | @SuppressWarnings("unchecked") |
91 | @Override |
92 | public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { |
93 | switch (featureID) { |
94 | case SeffPackage.CALL_ACTION__INPUT_VARIABLE_USAGES_CALL_ACTION: |
95 | return ((InternalEList<InternalEObject>)(InternalEList<?>)getInputVariableUsages__CallAction()).basicAdd(otherEnd, msgs); |
96 | } |
97 | return super.eInverseAdd(otherEnd, featureID, msgs); |
98 | } |
99 | |
100 | /** |
101 | * <!-- begin-user-doc --> |
102 | * <!-- end-user-doc --> |
103 | * @generated |
104 | */ |
105 | @Override |
106 | public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { |
107 | switch (featureID) { |
108 | case SeffPackage.CALL_ACTION__INPUT_VARIABLE_USAGES_CALL_ACTION: |
109 | return ((InternalEList<?>)getInputVariableUsages__CallAction()).basicRemove(otherEnd, msgs); |
110 | } |
111 | return super.eInverseRemove(otherEnd, featureID, msgs); |
112 | } |
113 | |
114 | /** |
115 | * <!-- begin-user-doc --> |
116 | * <!-- end-user-doc --> |
117 | * @generated |
118 | */ |
119 | @Override |
120 | public Object eGet(int featureID, boolean resolve, boolean coreType) { |
121 | switch (featureID) { |
122 | case SeffPackage.CALL_ACTION__INPUT_VARIABLE_USAGES_CALL_ACTION: |
123 | return getInputVariableUsages__CallAction(); |
124 | } |
125 | return super.eGet(featureID, resolve, coreType); |
126 | } |
127 | |
128 | /** |
129 | * <!-- begin-user-doc --> |
130 | * <!-- end-user-doc --> |
131 | * @generated |
132 | */ |
133 | @SuppressWarnings("unchecked") |
134 | @Override |
135 | public void eSet(int featureID, Object newValue) { |
136 | switch (featureID) { |
137 | case SeffPackage.CALL_ACTION__INPUT_VARIABLE_USAGES_CALL_ACTION: |
138 | getInputVariableUsages__CallAction().clear(); |
139 | getInputVariableUsages__CallAction().addAll((Collection<? extends VariableUsage>)newValue); |
140 | return; |
141 | } |
142 | super.eSet(featureID, newValue); |
143 | } |
144 | |
145 | /** |
146 | * <!-- begin-user-doc --> |
147 | * <!-- end-user-doc --> |
148 | * @generated |
149 | */ |
150 | @Override |
151 | public void eUnset(int featureID) { |
152 | switch (featureID) { |
153 | case SeffPackage.CALL_ACTION__INPUT_VARIABLE_USAGES_CALL_ACTION: |
154 | getInputVariableUsages__CallAction().clear(); |
155 | return; |
156 | } |
157 | super.eUnset(featureID); |
158 | } |
159 | |
160 | /** |
161 | * <!-- begin-user-doc --> |
162 | * <!-- end-user-doc --> |
163 | * @generated |
164 | */ |
165 | @Override |
166 | public boolean eIsSet(int featureID) { |
167 | switch (featureID) { |
168 | case SeffPackage.CALL_ACTION__INPUT_VARIABLE_USAGES_CALL_ACTION: |
169 | return inputVariableUsages__CallAction != null && !inputVariableUsages__CallAction.isEmpty(); |
170 | } |
171 | return super.eIsSet(featureID); |
172 | } |
173 | |
174 | } //CallActionImpl |