| /** |
| * <copyright> |
| * </copyright> |
| * |
| * $Id: ChildObject2Impl.java,v 1.1 2006/09/21 00:56:52 mtaal Exp $ |
| */ |
| package main.impl; |
| |
| import main.ChildObject2; |
| import main.MainPackage; |
| |
| import org.eclipse.emf.common.notify.Notification; |
| |
| import org.eclipse.emf.ecore.EClass; |
| |
| import org.eclipse.emf.ecore.impl.ENotificationImpl; |
| |
| /** |
| * <!-- begin-user-doc --> An implementation of the model object '<em><b>Child Object2</b></em>'. |
| * <!-- end-user-doc --> |
| * <p> |
| * The following features are implemented: |
| * <ul> |
| * <li>{@link main.impl.ChildObject2Impl#getLength <em>Length</em>}</li> |
| * </ul> |
| * </p> |
| * |
| * @generated |
| */ |
| public class ChildObject2Impl extends BaseObjectImpl implements ChildObject2 { |
| /** |
| * The default value of the '{@link #getLength() <em>Length</em>}' attribute. <!-- begin-user-doc |
| * --> <!-- end-user-doc --> |
| * |
| * @see #getLength() |
| * @generated |
| * @ordered |
| */ |
| protected static final Integer LENGTH_EDEFAULT = null; |
| |
| /** |
| * The cached value of the '{@link #getLength() <em>Length</em>}' attribute. <!-- begin-user-doc |
| * --> <!-- end-user-doc --> |
| * |
| * @see #getLength() |
| * @generated |
| * @ordered |
| */ |
| protected Integer length = LENGTH_EDEFAULT; |
| |
| /** |
| * <!-- begin-user-doc --> <!-- end-user-doc --> |
| * |
| * @generated |
| */ |
| protected ChildObject2Impl() { |
| super(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> <!-- end-user-doc --> |
| * |
| * @generated |
| */ |
| protected EClass eStaticClass() { |
| return MainPackage.Literals.CHILD_OBJECT2; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> <!-- end-user-doc --> |
| * |
| * @generated |
| */ |
| public Integer getLength() { |
| return length; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> <!-- end-user-doc --> |
| * |
| * @generated |
| */ |
| public void setLength(Integer newLength) { |
| Integer oldLength = length; |
| length = newLength; |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, MainPackage.CHILD_OBJECT2__LENGTH, |
| oldLength, length)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> <!-- end-user-doc --> |
| * |
| * @generated |
| */ |
| public Object eGet(int featureID, boolean resolve, boolean coreType) { |
| switch (featureID) { |
| case MainPackage.CHILD_OBJECT2__LENGTH: |
| return getLength(); |
| } |
| return super.eGet(featureID, resolve, coreType); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> <!-- end-user-doc --> |
| * |
| * @generated |
| */ |
| public void eSet(int featureID, Object newValue) { |
| switch (featureID) { |
| case MainPackage.CHILD_OBJECT2__LENGTH: |
| setLength((Integer) newValue); |
| return; |
| } |
| super.eSet(featureID, newValue); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> <!-- end-user-doc --> |
| * |
| * @generated |
| */ |
| public void eUnset(int featureID) { |
| switch (featureID) { |
| case MainPackage.CHILD_OBJECT2__LENGTH: |
| setLength(LENGTH_EDEFAULT); |
| return; |
| } |
| super.eUnset(featureID); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> <!-- end-user-doc --> |
| * |
| * @generated |
| */ |
| public boolean eIsSet(int featureID) { |
| switch (featureID) { |
| case MainPackage.CHILD_OBJECT2__LENGTH: |
| return LENGTH_EDEFAULT == null ? length != null : !LENGTH_EDEFAULT.equals(length); |
| } |
| return super.eIsSet(featureID); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> <!-- end-user-doc --> |
| * |
| * @generated |
| */ |
| public String toString() { |
| if (eIsProxy()) |
| return super.toString(); |
| |
| StringBuffer result = new StringBuffer(super.toString()); |
| result.append(" (length: "); |
| result.append(length); |
| result.append(')'); |
| return result.toString(); |
| } |
| |
| } // ChildObject2Impl |