/** * This file is protected by Copyright. * Please refer to the COPYRIGHT file distributed with this source distribution. * * This file is part of REDHAWK IDE. * * All rights reserved. This program and the accompanying materials are made available under * the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html. * */ // BEGIN GENERATED CODE package gov.redhawk.eclipsecorba.idl.impl; import gov.redhawk.eclipsecorba.idl.IdlPackage; import gov.redhawk.eclipsecorba.idl.ValueDcl; import gov.redhawk.eclipsecorba.idl.ValueForwardDcl; import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.InternalEObject; import org.eclipse.emf.ecore.impl.ENotificationImpl; /** * <!-- begin-user-doc --> * An implementation of the model object '<em><b>Value Forward Dcl</b></em>'. * @since 6.0 * <!-- end-user-doc --> * <p> * The following features are implemented: * <ul> * <li>{@link gov.redhawk.eclipsecorba.idl.impl.ValueForwardDclImpl#getValue <em>Value</em>}</li> * <li>{@link gov.redhawk.eclipsecorba.idl.impl.ValueForwardDclImpl#isAbstract <em>Abstract</em>}</li> * <li>{@link gov.redhawk.eclipsecorba.idl.impl.ValueForwardDclImpl#isLocal <em>Local</em>}</li> * </ul> * </p> * * @generated */ public class ValueForwardDclImpl extends ValueTypeDclImpl implements ValueForwardDcl { /** * The cached value of the '{@link #getValue() <em>Value</em>}' reference. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getValue() * @generated * @ordered */ protected ValueDcl value; /** * The default value of the '{@link #isAbstract() <em>Abstract</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #isAbstract() * @generated * @ordered */ protected static final boolean ABSTRACT_EDEFAULT = false; /** * The cached value of the '{@link #isAbstract() <em>Abstract</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #isAbstract() * @generated * @ordered */ protected boolean abstract_ = ABSTRACT_EDEFAULT; /** * The default value of the '{@link #isLocal() <em>Local</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #isLocal() * @generated * @ordered */ protected static final boolean LOCAL_EDEFAULT = false; /** * The cached value of the '{@link #isLocal() <em>Local</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #isLocal() * @generated * @ordered */ protected boolean local = LOCAL_EDEFAULT; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected ValueForwardDclImpl() { super(); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override protected EClass eStaticClass() { return IdlPackage.Literals.VALUE_FORWARD_DCL; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public ValueDcl getValue() { if (value != null && value.eIsProxy()) { InternalEObject oldValue = (InternalEObject)value; value = (ValueDcl)eResolveProxy(oldValue); if (value != oldValue) { if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.RESOLVE, IdlPackage.VALUE_FORWARD_DCL__VALUE, oldValue, value)); } } return value; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public ValueDcl basicGetValue() { return value; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setValue(ValueDcl newValue) { ValueDcl oldValue = value; value = newValue; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, IdlPackage.VALUE_FORWARD_DCL__VALUE, oldValue, value)); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public boolean isAbstract() { return abstract_; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setAbstract(boolean newAbstract) { boolean oldAbstract = abstract_; abstract_ = newAbstract; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, IdlPackage.VALUE_FORWARD_DCL__ABSTRACT, oldAbstract, abstract_)); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public boolean isLocal() { return local; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setLocal(boolean newLocal) { boolean oldLocal = local; local = newLocal; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, IdlPackage.VALUE_FORWARD_DCL__LOCAL, oldLocal, local)); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case IdlPackage.VALUE_FORWARD_DCL__VALUE: if (resolve) return getValue(); return basicGetValue(); case IdlPackage.VALUE_FORWARD_DCL__ABSTRACT: return isAbstract(); case IdlPackage.VALUE_FORWARD_DCL__LOCAL: return isLocal(); } return super.eGet(featureID, resolve, coreType); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case IdlPackage.VALUE_FORWARD_DCL__VALUE: setValue((ValueDcl)newValue); return; case IdlPackage.VALUE_FORWARD_DCL__ABSTRACT: setAbstract((Boolean)newValue); return; case IdlPackage.VALUE_FORWARD_DCL__LOCAL: setLocal((Boolean)newValue); return; } super.eSet(featureID, newValue); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case IdlPackage.VALUE_FORWARD_DCL__VALUE: setValue((ValueDcl)null); return; case IdlPackage.VALUE_FORWARD_DCL__ABSTRACT: setAbstract(ABSTRACT_EDEFAULT); return; case IdlPackage.VALUE_FORWARD_DCL__LOCAL: setLocal(LOCAL_EDEFAULT); return; } super.eUnset(featureID); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case IdlPackage.VALUE_FORWARD_DCL__VALUE: return value != null; case IdlPackage.VALUE_FORWARD_DCL__ABSTRACT: return abstract_ != ABSTRACT_EDEFAULT; case IdlPackage.VALUE_FORWARD_DCL__LOCAL: return local != LOCAL_EDEFAULT; } 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(" (abstract: "); result.append(abstract_); result.append(", local: "); result.append(local); result.append(')'); return result.toString(); } @Override public String getId() { if (this.id == null) { // TODO Auto-generated method stub return super.getId()+"Forward"; } return super.getId(); } /** * {@inheritDoc} */ @Override public String getScopedName() { // TODO Auto-generated method stub return super.getScopedName() + "Forward"; } } //ValueForwardDclImpl