content: /**
   */
  package com.intel.llvm.ireditor.lLVM_IR.impl;
  
  import com.intel.llvm.ireditor.lLVM_IR.Constant;
  import com.intel.llvm.ireditor.lLVM_IR.GlobalValueDef;
  import com.intel.llvm.ireditor.lLVM_IR.LLVM_IRPackage;
  
  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;
  import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
  
  /**
   * <!-- begin-user-doc -->
   * An implementation of the model object '<em><b>Constant</b></em>'.
   * <!-- end-user-doc -->
   * <p>
   * The following features are implemented:
   * <ul>
   *   <li>{@link com.intel.llvm.ireditor.lLVM_IR.impl.ConstantImpl#getRef <em>Ref</em>}</li>
   * </ul>
   * </p>
   *
   * @generated
   */
  public class ConstantImpl extends MinimalEObjectImpl.Container implements Constant
  {
    /**
     * The cached value of the '{@link #getRef() <em>Ref</em>}' reference.
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @see #getRef()
     * @generated
     * @ordered
     */
    protected GlobalValueDef ref;
  
    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    protected ConstantImpl()
    {
      super();
    }
  
    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    @Override
    protected EClass eStaticClass()
    {
      return LLVM_IRPackage.Literals.CONSTANT;
    }
  
    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public GlobalValueDef getRef()
    {
      if (ref != null && ref.eIsProxy())
      {
        InternalEObject oldRef = (InternalEObject)ref;
        ref = (GlobalValueDef)eResolveProxy(oldRef);
        if (ref != oldRef)
        {
          if (eNotificationRequired())
            eNotify(new ENotificationImpl(this, Notification.RESOLVE, LLVM_IRPackage.CONSTANT__REF, oldRef, ref));
        }
      }
      return ref;
    }
  
    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public GlobalValueDef basicGetRef()
    {
      return ref;
    }
  
    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public void setRef(GlobalValueDef newRef)
    {
      GlobalValueDef oldRef = ref;
      ref = newRef;
      if (eNotificationRequired())
        eNotify(new ENotificationImpl(this, Notification.SET, LLVM_IRPackage.CONSTANT__REF, oldRef, ref));
    }
  
    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    @Override
    public Object eGet(int featureID, boolean resolve, boolean coreType)
    {
      switch (featureID)
      {
        case LLVM_IRPackage.CONSTANT__REF:
          if (resolve) return getRef();
          return basicGetRef();
      }
      return super.eGet(featureID, resolve, coreType);
    }
  
    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    @Override
    public void eSet(int featureID, Object newValue)
    {
      switch (featureID)
      {
        case LLVM_IRPackage.CONSTANT__REF:
          setRef((GlobalValueDef)newValue);
          return;
      }
      super.eSet(featureID, newValue);
    }
  
    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    @Override
    public void eUnset(int featureID)
    {
      switch (featureID)
      {
        case LLVM_IRPackage.CONSTANT__REF:
          setRef((GlobalValueDef)null);
          return;
      }
      super.eUnset(featureID);
    }
  
    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    @Override
    public boolean eIsSet(int featureID)
    {
      switch (featureID)
      {
        case LLVM_IRPackage.CONSTANT__REF:
          return ref != null;
      }
      return super.eIsSet(featureID);
    }
  
  } //ConstantImpl
  