| /** |
| * <copyright> |
| * </copyright> |
| * |
| */ |
| package org.eclipse.xtext.example.arithmetics.arithmetics.impl; |
| |
| import org.eclipse.emf.common.notify.Notification; |
| |
| import org.eclipse.emf.ecore.EClass; |
| |
| import org.eclipse.emf.ecore.impl.ENotificationImpl; |
| import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; |
| |
| import org.eclipse.xtext.example.arithmetics.arithmetics.ArithmeticsPackage; |
| import org.eclipse.xtext.example.arithmetics.arithmetics.Import; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * An implementation of the model object '<em><b>Import</b></em>'. |
| * <!-- end-user-doc --> |
| * <p> |
| * The following features are implemented: |
| * <ul> |
| * <li>{@link org.eclipse.xtext.example.arithmetics.arithmetics.impl.ImportImpl#getImportedNamespace <em>Imported Namespace</em>}</li> |
| * </ul> |
| * </p> |
| * |
| * @generated |
| */ |
| public class ImportImpl extends MinimalEObjectImpl.Container implements Import |
| { |
| /** |
| * The default value of the '{@link #getImportedNamespace() <em>Imported Namespace</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getImportedNamespace() |
| * @generated |
| * @ordered |
| */ |
| protected static final String IMPORTED_NAMESPACE_EDEFAULT = null; |
| |
| /** |
| * The cached value of the '{@link #getImportedNamespace() <em>Imported Namespace</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getImportedNamespace() |
| * @generated |
| * @ordered |
| */ |
| protected String importedNamespace = IMPORTED_NAMESPACE_EDEFAULT; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected ImportImpl() |
| { |
| super(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| protected EClass eStaticClass() |
| { |
| return ArithmeticsPackage.Literals.IMPORT; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public String getImportedNamespace() |
| { |
| return importedNamespace; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setImportedNamespace(String newImportedNamespace) |
| { |
| String oldImportedNamespace = importedNamespace; |
| importedNamespace = newImportedNamespace; |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, ArithmeticsPackage.IMPORT__IMPORTED_NAMESPACE, oldImportedNamespace, importedNamespace)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public Object eGet(int featureID, boolean resolve, boolean coreType) |
| { |
| switch (featureID) |
| { |
| case ArithmeticsPackage.IMPORT__IMPORTED_NAMESPACE: |
| return getImportedNamespace(); |
| } |
| return super.eGet(featureID, resolve, coreType); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eSet(int featureID, Object newValue) |
| { |
| switch (featureID) |
| { |
| case ArithmeticsPackage.IMPORT__IMPORTED_NAMESPACE: |
| setImportedNamespace((String)newValue); |
| return; |
| } |
| super.eSet(featureID, newValue); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eUnset(int featureID) |
| { |
| switch (featureID) |
| { |
| case ArithmeticsPackage.IMPORT__IMPORTED_NAMESPACE: |
| setImportedNamespace(IMPORTED_NAMESPACE_EDEFAULT); |
| return; |
| } |
| super.eUnset(featureID); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public boolean eIsSet(int featureID) |
| { |
| switch (featureID) |
| { |
| case ArithmeticsPackage.IMPORT__IMPORTED_NAMESPACE: |
| return IMPORTED_NAMESPACE_EDEFAULT == null ? importedNamespace != null : !IMPORTED_NAMESPACE_EDEFAULT.equals(importedNamespace); |
| } |
| return super.eIsSet(featureID); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public String toString() |
| { |
| if (eIsProxy()) return super.toString(); |
| |
| StringBuffer result = new StringBuffer(super.toString()); |
| result.append(" (importedNamespace: "); |
| result.append(importedNamespace); |
| result.append(')'); |
| return result.toString(); |
| } |
| |
| } //ImportImpl |