001: /**
002: * <copyright>
003: * </copyright>
004: *
005: * $Id$
006: */package newprocess.impl;
007:
008: import newprocess.EnvEntry;
009: import newprocess.NewprocessPackage;
010:
011: import org.eclipse.emf.common.notify.Notification;
012:
013: import org.eclipse.emf.ecore.EClass;
014:
015: import org.eclipse.emf.ecore.impl.ENotificationImpl;
016: import org.eclipse.emf.ecore.impl.EObjectImpl;
017:
018: /**
019: * <!-- begin-user-doc -->
020: * An implementation of the model object '<em><b>Env Entry</b></em>'.
021: * <!-- end-user-doc -->
022: * <p>
023: * The following features are implemented:
024: * <ul>
025: * <li>{@link newprocess.impl.EnvEntryImpl#getName <em>Name</em>}</li>
026: * <li>{@link newprocess.impl.EnvEntryImpl#getType <em>Type</em>}</li>
027: * <li>{@link newprocess.impl.EnvEntryImpl#getValue <em>Value</em>}</li>
028: * </ul>
029: * </p>
030: *
031: * @generated
032: */
033: public class EnvEntryImpl extends EObjectImpl implements EnvEntry {
034: /**
035: * The default value of the '{@link #getName() <em>Name</em>}' attribute.
036: * <!-- begin-user-doc -->
037: * <!-- end-user-doc -->
038: * @see #getName()
039: * @generated
040: * @ordered
041: */
042: protected static final String NAME_EDEFAULT = null;
043:
044: /**
045: * The cached value of the '{@link #getName() <em>Name</em>}' attribute.
046: * <!-- begin-user-doc -->
047: * <!-- end-user-doc -->
048: * @see #getName()
049: * @generated
050: * @ordered
051: */
052: protected String name = NAME_EDEFAULT;
053:
054: /**
055: * The default value of the '{@link #getType() <em>Type</em>}' attribute.
056: * <!-- begin-user-doc -->
057: * <!-- end-user-doc -->
058: * @see #getType()
059: * @generated
060: * @ordered
061: */
062: protected static final String TYPE_EDEFAULT = null;
063:
064: /**
065: * The cached value of the '{@link #getType() <em>Type</em>}' attribute.
066: * <!-- begin-user-doc -->
067: * <!-- end-user-doc -->
068: * @see #getType()
069: * @generated
070: * @ordered
071: */
072: protected String type = TYPE_EDEFAULT;
073:
074: /**
075: * The default value of the '{@link #getValue() <em>Value</em>}' attribute.
076: * <!-- begin-user-doc -->
077: * <!-- end-user-doc -->
078: * @see #getValue()
079: * @generated
080: * @ordered
081: */
082: protected static final String VALUE_EDEFAULT = null;
083:
084: /**
085: * The cached value of the '{@link #getValue() <em>Value</em>}' attribute.
086: * <!-- begin-user-doc -->
087: * <!-- end-user-doc -->
088: * @see #getValue()
089: * @generated
090: * @ordered
091: */
092: protected String value = VALUE_EDEFAULT;
093:
094: /**
095: * <!-- begin-user-doc -->
096: * <!-- end-user-doc -->
097: * @generated
098: */
099: protected EnvEntryImpl() {
100: super ();
101: }
102:
103: /**
104: * <!-- begin-user-doc -->
105: * <!-- end-user-doc -->
106: * @generated
107: */
108: @Override
109: protected EClass eStaticClass() {
110: return NewprocessPackage.Literals.ENV_ENTRY;
111: }
112:
113: /**
114: * <!-- begin-user-doc -->
115: * <!-- end-user-doc -->
116: * @generated
117: */
118: public String getName() {
119: return name;
120: }
121:
122: /**
123: * <!-- begin-user-doc -->
124: * <!-- end-user-doc -->
125: * @generated
126: */
127: public void setName(String newName) {
128: String oldName = name;
129: name = newName;
130: if (eNotificationRequired())
131: eNotify(new ENotificationImpl(this , Notification.SET,
132: NewprocessPackage.ENV_ENTRY__NAME, oldName, name));
133: }
134:
135: /**
136: * <!-- begin-user-doc -->
137: * <!-- end-user-doc -->
138: * @generated
139: */
140: public String getType() {
141: return type;
142: }
143:
144: /**
145: * <!-- begin-user-doc -->
146: * <!-- end-user-doc -->
147: * @generated
148: */
149: public void setType(String newType) {
150: String oldType = type;
151: type = newType;
152: if (eNotificationRequired())
153: eNotify(new ENotificationImpl(this , Notification.SET,
154: NewprocessPackage.ENV_ENTRY__TYPE, oldType, type));
155: }
156:
157: /**
158: * <!-- begin-user-doc -->
159: * <!-- end-user-doc -->
160: * @generated
161: */
162: public String getValue() {
163: return value;
164: }
165:
166: /**
167: * <!-- begin-user-doc -->
168: * <!-- end-user-doc -->
169: * @generated
170: */
171: public void setValue(String newValue) {
172: String oldValue = value;
173: value = newValue;
174: if (eNotificationRequired())
175: eNotify(new ENotificationImpl(this , Notification.SET,
176: NewprocessPackage.ENV_ENTRY__VALUE, oldValue, value));
177: }
178:
179: /**
180: * <!-- begin-user-doc -->
181: * <!-- end-user-doc -->
182: * @generated
183: */
184: @Override
185: public Object eGet(int featureID, boolean resolve, boolean coreType) {
186: switch (featureID) {
187: case NewprocessPackage.ENV_ENTRY__NAME:
188: return getName();
189: case NewprocessPackage.ENV_ENTRY__TYPE:
190: return getType();
191: case NewprocessPackage.ENV_ENTRY__VALUE:
192: return getValue();
193: }
194: return super .eGet(featureID, resolve, coreType);
195: }
196:
197: /**
198: * <!-- begin-user-doc -->
199: * <!-- end-user-doc -->
200: * @generated
201: */
202: @Override
203: public void eSet(int featureID, Object newValue) {
204: switch (featureID) {
205: case NewprocessPackage.ENV_ENTRY__NAME:
206: setName((String) newValue);
207: return;
208: case NewprocessPackage.ENV_ENTRY__TYPE:
209: setType((String) newValue);
210: return;
211: case NewprocessPackage.ENV_ENTRY__VALUE:
212: setValue((String) newValue);
213: return;
214: }
215: super .eSet(featureID, newValue);
216: }
217:
218: /**
219: * <!-- begin-user-doc -->
220: * <!-- end-user-doc -->
221: * @generated
222: */
223: @Override
224: public void eUnset(int featureID) {
225: switch (featureID) {
226: case NewprocessPackage.ENV_ENTRY__NAME:
227: setName(NAME_EDEFAULT);
228: return;
229: case NewprocessPackage.ENV_ENTRY__TYPE:
230: setType(TYPE_EDEFAULT);
231: return;
232: case NewprocessPackage.ENV_ENTRY__VALUE:
233: setValue(VALUE_EDEFAULT);
234: return;
235: }
236: super .eUnset(featureID);
237: }
238:
239: /**
240: * <!-- begin-user-doc -->
241: * <!-- end-user-doc -->
242: * @generated
243: */
244: @Override
245: public boolean eIsSet(int featureID) {
246: switch (featureID) {
247: case NewprocessPackage.ENV_ENTRY__NAME:
248: return NAME_EDEFAULT == null ? name != null
249: : !NAME_EDEFAULT.equals(name);
250: case NewprocessPackage.ENV_ENTRY__TYPE:
251: return TYPE_EDEFAULT == null ? type != null
252: : !TYPE_EDEFAULT.equals(type);
253: case NewprocessPackage.ENV_ENTRY__VALUE:
254: return VALUE_EDEFAULT == null ? value != null
255: : !VALUE_EDEFAULT.equals(value);
256: }
257: return super .eIsSet(featureID);
258: }
259:
260: /**
261: * <!-- begin-user-doc -->
262: * <!-- end-user-doc -->
263: * @generated
264: */
265: @Override
266: public String toString() {
267: if (eIsProxy())
268: return super .toString();
269:
270: StringBuffer result = new StringBuffer(super .toString());
271: result.append(" (name: ");
272: result.append(name);
273: result.append(", type: ");
274: result.append(type);
275: result.append(", value: ");
276: result.append(value);
277: result.append(')');
278: return result.toString();
279: }
280:
281: } //EnvEntryImpl
|