/** * 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.expressions.impl; import gov.redhawk.eclipsecorba.idl.IdlTypeDcl; import gov.redhawk.eclipsecorba.idl.expressions.ExpressionsPackage; import gov.redhawk.eclipsecorba.idl.expressions.ScopeLiteral; 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>Scope Literal</b></em>'. * <!-- end-user-doc --> * <p> * The following features are implemented: * <ul> * <li>{@link gov.redhawk.eclipsecorba.idl.expressions.impl.ScopeLiteralImpl#getValue <em>Value</em>}</li> * </ul> * </p> * * @generated */ public class ScopeLiteralImpl extends ExpressionImpl implements ScopeLiteral { /** * The cached value of the '{@link #getValue() <em>Value</em>}' reference. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getValue() * @generated * @ordered */ protected IdlTypeDcl value; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected ScopeLiteralImpl() { super(); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override protected EClass eStaticClass() { return ExpressionsPackage.Literals.SCOPE_LITERAL; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public IdlTypeDcl getValue() { if (value != null && value.eIsProxy()) { InternalEObject oldValue = (InternalEObject)value; value = (IdlTypeDcl)eResolveProxy(oldValue); if (value != oldValue) { if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.RESOLVE, ExpressionsPackage.SCOPE_LITERAL__VALUE, oldValue, value)); } } return value; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public IdlTypeDcl basicGetValue() { return value; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setValue(IdlTypeDcl newValue) { IdlTypeDcl oldValue = value; value = newValue; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, ExpressionsPackage.SCOPE_LITERAL__VALUE, oldValue, value)); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case ExpressionsPackage.SCOPE_LITERAL__VALUE: if (resolve) return getValue(); return basicGetValue(); } return super.eGet(featureID, resolve, coreType); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case ExpressionsPackage.SCOPE_LITERAL__VALUE: setValue((IdlTypeDcl)newValue); return; } super.eSet(featureID, newValue); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case ExpressionsPackage.SCOPE_LITERAL__VALUE: setValue((IdlTypeDcl)null); return; } super.eUnset(featureID); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case ExpressionsPackage.SCOPE_LITERAL__VALUE: return value != null; } return super.eIsSet(featureID); } } //ScopeLiteralImpl